Bug 1204043 - remove mServeMultipleEventsPerPollIter pref. r=mcmanus

This commit is contained in:
Dragana Damjanovic 2015-09-15 05:10:00 +02:00
parent 9aca84c96f
commit 09970df1f7
3 changed files with 39 additions and 60 deletions

View File

@ -1457,10 +1457,6 @@ pref("network.http.packaged-apps-developer-mode", false);
pref("network.ftp.data.qos", 0);
pref("network.ftp.control.qos", 0);
// If this pref is false only one xpcom event will be served per poll
// iteration. This is the original behavior.
// If it is true multiple events will be served.
pref("network.sts.serve_multiple_events_per_poll_iteration", true);
// The max time to spend on xpcom events between two polls in ms.
pref("network.sts.max_time_for_events_between_two_polls", 100);
// </http>

View File

@ -44,7 +44,6 @@ PRThread *gSocketThread = nullptr;
#define SOCKET_LIMIT_TARGET 550U
#define SOCKET_LIMIT_MIN 50U
#define BLIP_INTERVAL_PREF "network.activity.blipIntervalMilliseconds"
#define SERVE_MULTIPLE_EVENTS_PREF "network.sts.serve_multiple_events_per_poll_iteration"
#define MAX_TIME_BETWEEN_TWO_POLLS "network.sts.max_time_for_events_between_two_polls"
#define TELEMETRY_PREF "toolkit.telemetry.enabled"
@ -106,7 +105,6 @@ nsSocketTransportService::nsSocketTransportService()
, mKeepaliveRetryIntervalS(1)
, mKeepaliveProbeCount(kDefaultTCPKeepCount)
, mKeepaliveEnabledPref(false)
, mServeMultipleEventsPerPollIter(true)
, mServingPendingQueue(false)
, mMaxTimePerPollIter(100)
, mTelemetryEnabledPref(false)
@ -543,7 +541,6 @@ nsSocketTransportService::Init()
tmpPrefService->AddObserver(KEEPALIVE_IDLE_TIME_PREF, this, false);
tmpPrefService->AddObserver(KEEPALIVE_RETRY_INTERVAL_PREF, this, false);
tmpPrefService->AddObserver(KEEPALIVE_PROBE_COUNT_PREF, this, false);
tmpPrefService->AddObserver(SERVE_MULTIPLE_EVENTS_PREF, this, false);
tmpPrefService->AddObserver(MAX_TIME_BETWEEN_TWO_POLLS, this, false);
tmpPrefService->AddObserver(TELEMETRY_PREF, this, false);
}
@ -885,7 +882,6 @@ nsSocketTransportService::Run()
}
if (pendingEvents) {
if (mServeMultipleEventsPerPollIter) {
if (!mServingPendingQueue) {
nsresult rv = Dispatch(NS_NewRunnableMethod(this,
&nsSocketTransportService::MarkTheLastElementOfPendingQueue),
@ -932,11 +928,6 @@ nsSocketTransportService::Run()
numberOfPendingEvents = 0;
pollDuration = 0;
}
} else {
NS_ProcessNextEvent(thread);
pendingEvents = false;
thread->HasPendingEvents(&pendingEvents);
}
}
} while (pendingEvents);
@ -1206,13 +1197,6 @@ nsSocketTransportService::UpdatePrefs()
OnKeepaliveEnabledPrefChange();
}
bool serveMultiplePref = false;
rv = tmpPrefService->GetBoolPref(SERVE_MULTIPLE_EVENTS_PREF,
&serveMultiplePref);
if (NS_SUCCEEDED(rv)) {
mServeMultipleEventsPerPollIter = serveMultiplePref;
}
int32_t maxTimePref;
rv = tmpPrefService->GetIntPref(MAX_TIME_BETWEEN_TWO_POLLS,
&maxTimePref);

View File

@ -236,7 +236,6 @@ private:
// True if TCP keepalive is enabled globally.
bool mKeepaliveEnabledPref;
bool mServeMultipleEventsPerPollIter;
mozilla::Atomic<bool> mServingPendingQueue;
int32_t mMaxTimePerPollIter;
mozilla::Atomic<bool, mozilla::Relaxed> mTelemetryEnabledPref;