Bug 1228652 - Check for window.closed after flushing messages in navigateAndRestore. r=mossop
authorMike Conley <mconley@mozilla.com>
Sun, 28 Feb 2016 20:36:47 -0500
changeset 324361 1e8467611bd617e8f0133fedf0d4152296c41e7f
parent 324360 2a613f5a58663485f3c20b18a9fc867a09bc532a
child 324362 02a2962dcbecff190b62d6c398b79b0ab8ff6325
push id1128
push userjlund@mozilla.com
push dateWed, 01 Jun 2016 01:31:59 +0000
treeherdermozilla-release@fe0d30de989d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmossop
bugs1228652
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 1228652 - Check for window.closed after flushing messages in navigateAndRestore. r=mossop MozReview-Commit-ID: 9Cgxg9A61O7
browser/components/sessionstore/SessionStore.jsm
--- a/browser/components/sessionstore/SessionStore.jsm
+++ b/browser/components/sessionstore/SessionStore.jsm
@@ -2504,17 +2504,17 @@ var SessionStoreInternal = {
       // The tab might have been closed/gone in the meantime.
       if (tab.closing || !tab.linkedBrowser) {
         return;
       }
 
       let window = tab.ownerDocument && tab.ownerDocument.defaultView;
 
       // The tab or its window might be gone.
-      if (!window || !window.__SSi) {
+      if (!window || !window.__SSi || window.closed) {
         return;
       }
 
       let tabState = TabState.clone(tab);
       let options = {restoreImmediately: true};
 
       if (historyIndex >= 0) {
         tabState.index = historyIndex + 1;