зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1570082 - Convert content.notify.backoffcount to static pref. r=njn
Converts content.notify.backoffcount varcache pref to static pref. Differential Revision: https://phabricator.services.mozilla.com/D40133 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
f22377c729
Коммит
9783b23738
|
@ -135,7 +135,6 @@ nsContentSink::~nsContentSink() {
|
|||
}
|
||||
}
|
||||
|
||||
int32_t nsContentSink::sBackoffCount;
|
||||
int32_t nsContentSink::sNotificationInterval;
|
||||
int32_t nsContentSink::sInteractiveDeflectCount;
|
||||
int32_t nsContentSink::sPerfDeflectCount;
|
||||
|
@ -148,9 +147,6 @@ int32_t nsContentSink::sInitialPerfTime;
|
|||
int32_t nsContentSink::sEnablePerfMode;
|
||||
|
||||
void nsContentSink::InitializeStatics() {
|
||||
// -1 means never.
|
||||
Preferences::AddIntVarCache(&sBackoffCount, "content.notify.backoffcount",
|
||||
-1);
|
||||
// The gNotificationInterval has a dramatic effect on how long it
|
||||
// takes to initially display content for slow connections.
|
||||
// The current value provides good
|
||||
|
@ -210,7 +206,7 @@ nsresult nsContentSink::Init(Document* aDoc, nsIURI* aURI,
|
|||
|
||||
mNodeInfoManager = aDoc->NodeInfoManager();
|
||||
|
||||
mBackoffCount = sBackoffCount;
|
||||
mBackoffCount = StaticPrefs::content_notify_backoffcount();
|
||||
|
||||
if (sEnablePerfMode != 0) {
|
||||
mDynamicLowerValue = sEnablePerfMode == 1;
|
||||
|
|
|
@ -337,8 +337,6 @@ class nsContentSink : public nsICSSLoaderObserver,
|
|||
nsRevocableEventPtr<nsRunnableMethod<nsContentSink, void, false> >
|
||||
mProcessLinkHeaderEvent;
|
||||
|
||||
// Back off timer notification after count.
|
||||
static int32_t sBackoffCount;
|
||||
// Notification interval in microseconds
|
||||
static int32_t sNotificationInterval;
|
||||
// How many times to deflect in interactive/perf modes
|
||||
|
|
|
@ -978,6 +978,13 @@
|
|||
# Prefs starting with "content."
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# Back off timer notification after count.
|
||||
# -1 means never.
|
||||
- name: content.notify.backoffcount
|
||||
type: int32_t
|
||||
value: -1
|
||||
mirror: always
|
||||
|
||||
# Do we notify based on time?
|
||||
- name: content.notify.ontimer
|
||||
type: bool
|
||||
|
|
Загрузка…
Ссылка в новой задаче