Bug 1370783 - Account for tabs that have just crashed when updating state in preActions of async tab switcher. r?billm draft
authorMike Conley <mconley@mozilla.com>
Tue, 22 Aug 2017 13:41:44 -0400
changeset 666412 544fcbc284e22f03f2775d294a1fdbd2626bc7e2
parent 666274 ffe6cc09ccf38cca6f0e727837bbc6cb722d1e71
child 732099 c66b3ff074ca56281894b560557056957cef422d
push id80401
push usermconley@mozilla.com
push dateMon, 18 Sep 2017 18:22:37 +0000
reviewersbillm
bugs1370783
milestone57.0a1
Bug 1370783 - Account for tabs that have just crashed when updating state in preActions of async tab switcher. r?billm MozReview-Commit-ID: 2YIcVg6RldT
browser/base/content/tabbrowser.xml
--- a/browser/base/content/tabbrowser.xml
+++ b/browser/base/content/tabbrowser.xml
@@ -4638,17 +4638,24 @@
               }
               if (this.blankTab && !this.blankTab.linkedBrowser) {
                 this.blankTab = null;
               }
               if (this.spinnerTab && !this.spinnerTab.linkedBrowser) {
                 this.spinnerHidden();
                 this.spinnerTab = null;
               }
-              if (this.loadingTab && !this.loadingTab.linkedBrowser) {
+
+              let loadingTabIsMissingOrCrashed =
+                this.loadingTab &&
+                (!this.loadingTab.linkedBrowser ||
+                 (this.loadingTab.linkedBrowser.isRemoteBrowser &&
+                  !this.loadingTab.linkedBrowser.frameLoader.tabParent));
+
+              if (loadingTabIsMissingOrCrashed) {
                 this.loadingTab = null;
                 this.clearTimer(this.loadTimer);
                 this.loadTimer = null;
               }
             },
 
             // This code runs after we've responded to an event or requested a new
             // tab. It's expected that we've already updated all the principal