From f1b12f5aa9cafea3cc60e15c56104e5e4db0e7f5 Mon Sep 17 00:00:00 2001 From: kriswright Date: Thu, 1 Aug 2019 16:07:25 +0000 Subject: [PATCH] Bug 1570082 - Convert content.notify.interval to static pref. r=njn Converts content.notify.interval varcache pref to a static pref. Rewords the description, which referenced 'gNotificationInterval' which no longer existed. Differential Revision: https://phabricator.services.mozilla.com/D40134 --HG-- extra : moz-landing-system : lando --- dom/base/nsContentSink.cpp | 10 ---------- dom/base/nsContentSink.h | 4 +--- modules/libpref/init/StaticPrefList.yaml | 12 ++++++++++++ 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/dom/base/nsContentSink.cpp b/dom/base/nsContentSink.cpp index d0a3c9293efc..b08c11f01777 100644 --- a/dom/base/nsContentSink.cpp +++ b/dom/base/nsContentSink.cpp @@ -135,7 +135,6 @@ nsContentSink::~nsContentSink() { } } -int32_t nsContentSink::sNotificationInterval; int32_t nsContentSink::sInteractiveDeflectCount; int32_t nsContentSink::sPerfDeflectCount; int32_t nsContentSink::sPendingEventMode; @@ -147,15 +146,6 @@ int32_t nsContentSink::sInitialPerfTime; int32_t nsContentSink::sEnablePerfMode; void nsContentSink::InitializeStatics() { - // The gNotificationInterval has a dramatic effect on how long it - // takes to initially display content for slow connections. - // The current value provides good - // incremental display of content without causing an increase - // in page load time. If this value is set below 1/10 of second - // it starts to impact page load performance. - // see bugzilla bug 72138 for more info. - Preferences::AddIntVarCache(&sNotificationInterval, "content.notify.interval", - 120000); Preferences::AddIntVarCache(&sInteractiveDeflectCount, "content.sink.interactive_deflect_count", 0); Preferences::AddIntVarCache(&sPerfDeflectCount, diff --git a/dom/base/nsContentSink.h b/dom/base/nsContentSink.h index 7b7fa47b760f..d4b1954e39df 100644 --- a/dom/base/nsContentSink.h +++ b/dom/base/nsContentSink.h @@ -257,7 +257,7 @@ class nsContentSink : public nsICSSLoaderObserver, return 1000; } - return sNotificationInterval; + return mozilla::StaticPrefs::content_notify_interval(); } virtual nsresult FlushTags() = 0; @@ -337,8 +337,6 @@ class nsContentSink : public nsICSSLoaderObserver, nsRevocableEventPtr > mProcessLinkHeaderEvent; - // Notification interval in microseconds - static int32_t sNotificationInterval; // How many times to deflect in interactive/perf modes static int32_t sInteractiveDeflectCount; static int32_t sPerfDeflectCount; diff --git a/modules/libpref/init/StaticPrefList.yaml b/modules/libpref/init/StaticPrefList.yaml index b5bc7e27d6a1..5b37afa2780d 100644 --- a/modules/libpref/init/StaticPrefList.yaml +++ b/modules/libpref/init/StaticPrefList.yaml @@ -985,6 +985,18 @@ value: -1 mirror: always +# Notification interval in microseconds. +# The notification interval has a dramatic effect on how long it takes to +# initially display content for slow connections. The current value +# provides good incremental display of content without causing an increase +# in page load time. If this value is set below 1/10 of a second it starts +# to impact page load performance. +# See bugzilla bug 72138 for more info. +- name: content.notify.interval + type: int32_t + value: 120000 + mirror: always + # Do we notify based on time? - name: content.notify.ontimer type: bool