Bug 1231422 - Fix busted pref observer for browser.sessionstore.debug.no_auto_updates. r=billm
authorMike Conley <mconley@mozilla.com>
Fri, 22 Jan 2016 11:43:49 -0500
changeset 281554 98ccd385e6fd837cd6248367a82ffdf2627cf493
parent 281553 08f0995ef87370f56d8148dcdec0e74d3ab313f6
child 281555 b94c1a472d4654e801c2de90e3119ebdf776b50a
push id70845
push usermconley@mozilla.com
push dateTue, 26 Jan 2016 03:33:57 +0000
treeherdermozilla-inbound@98ccd385e6fd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbillm
bugs1231422
milestone47.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1231422 - Fix busted pref observer for browser.sessionstore.debug.no_auto_updates. r=billm
browser/components/sessionstore/content/content-sessionStore.js
--- a/browser/components/sessionstore/content/content-sessionStore.js
+++ b/browser/components/sessionstore/content/content-sessionStore.js
@@ -705,17 +705,17 @@ var MessageQueue = {
     Services.prefs.addObserver(TIMEOUT_DISABLED_PREF, this, false);
   },
 
   uninit() {
     Services.prefs.removeObserver(TIMEOUT_DISABLED_PREF, this);
   },
 
   observe(subject, topic, data) {
-    if (topic == TIMEOUT_DISABLED_PREF) {
+    if (topic == "nsPref:changed" && data == TIMEOUT_DISABLED_PREF) {
       this.timeoutDisabled =
         Services.prefs.getBoolPref(TIMEOUT_DISABLED_PREF);
     }
   },
 
   /**
    * Pushes a given |value| onto the queue. The given |key| represents the type
    * of data that is stored and can override data that has been queued before