Bug 1245212 - Properly cancel SessionStore:update message timers if timeoutDisabled is set to true. r=billm
authorMike Conley <mconley@mozilla.com>
Mon, 01 Feb 2016 16:00:29 -0500
changeset 329844 dc2c6c1a4fe3ed7413ce361e1dcf2c556d1384b0
parent 329843 0c51994fbafe65be49c253ed58390f1ef4de691c
child 329845 802e3c169db8af28f8a9d30115e05d120f1f544b
child 330163 66e0b464699099b2f1e41d78adb60aa327e9f10a
child 330455 2992127f7fa587e71e2fe34ec00d0b67e834cd26
push id10617
push userdtownsend@mozilla.com
push dateTue, 09 Feb 2016 16:30:19 +0000
reviewersbillm
bugs1245212
milestone47.0a1
Bug 1245212 - Properly cancel SessionStore:update message timers if timeoutDisabled is set to true. r=billm MozReview-Commit-ID: BjiumfIOrdT
browser/components/sessionstore/content/content-sessionStore.js
--- a/browser/components/sessionstore/content/content-sessionStore.js
+++ b/browser/components/sessionstore/content/content-sessionStore.js
@@ -685,17 +685,17 @@ var MessageQueue = {
 
   /**
    * Disables sending batched messages on a timer. Also cancels any pending
    * timers.
    */
   set timeoutDisabled(val) {
     this._timeoutDisabled = val;
 
-    if (!val && this._timeout) {
+    if (val && this._timeout) {
       clearTimeout(this._timeout);
       this._timeout = null;
     }
 
     return val;
   },
 
   init() {