Backed out changeset 35603c406f26 (bug 824021) win bc-1 test failures
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Wed, 16 Apr 2014 12:58:59 +0200
changeset 190931 0ee15acfea79fa8d0dd1c5ddb9e6d04e56c99ac2
parent 190930 35603c406f26ccf7e70c75e26e7733a1f7f0d3c6
child 190932 14b25d18dbada515097030d6813540de6298157f
push idunknown
push userunknown
push dateunknown
bugs824021
milestone31.0a1
backs out35603c406f26ccf7e70c75e26e7733a1f7f0d3c6
Backed out changeset 35603c406f26 (bug 824021) win bc-1 test failures
browser/components/sessionstore/src/SessionStore.jsm
--- a/browser/components/sessionstore/src/SessionStore.jsm
+++ b/browser/components/sessionstore/src/SessionStore.jsm
@@ -673,16 +673,18 @@ let SessionStoreInternal = {
             this.restoreTabContent(tab);
           }
         }
         break;
       default:
         debug("received unknown message '" + aMessage.name + "'");
         break;
     }
+
+    this._clearRestoringWindows();
   },
 
   /**
    * Record telemetry measurements stored in an object.
    * @param telemetry
    *        {histogramID: value, ...} An object mapping histogramIDs to the
    *        value to be recorded for that ID,
    */
@@ -3393,25 +3395,16 @@ let SessionStoreInternal = {
            !!this._closedWindows[normalWindowIndex].isPopup)
       normalWindowIndex++;
     if (normalWindowIndex >= this._max_windows_undo)
       spliceTo = normalWindowIndex + 1;
 #endif
     this._closedWindows.splice(spliceTo, this._closedWindows.length);
   },
 
-  /**
-   * Clears the set of windows that are "resurrected" before writing to disk to
-   * make closing windows one after the other until shutdown work as expected.
-   *
-   * This function should only be called when we are sure that there has been
-   * a user action that indicates the browser is actively being used and all
-   * windows that have been closed before are not part of a series of closing
-   * windows.
-   */
   _clearRestoringWindows: function ssi_clearRestoringWindows() {
     for (let i = 0; i < this._closedWindows.length; i++) {
       delete this._closedWindows[i]._shouldRestore;
     }
   },
 
   /**
    * Reset state to prepare for a new session state to be restored.