Bug 1304359 - Don't break browser for tabswitch assertions (r=mconley)
authorBill McCloskey <billm@mozilla.com>
Tue, 27 Sep 2016 13:49:59 -0700
changeset 315504 bcaf503c7f54b49b0c7e73b77af0d7a0524a3486
parent 315503 0c77cef67bdd1c3ac634a996ae0d084f8d14e446
child 315505 a376f49314e3dab3ace4f7f14b310ef3e64dd1fd
push id30750
push usercbook@mozilla.com
push dateWed, 28 Sep 2016 13:57:20 +0000
treeherdermozilla-central@b1d60f2f68c7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmconley
bugs1304359
milestone52.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 1304359 - Don't break browser for tabswitch assertions (r=mconley)
browser/base/content/tabbrowser.xml
--- a/browser/base/content/tabbrowser.xml
+++ b/browser/base/content/tabbrowser.xml
@@ -3673,17 +3673,21 @@
               }
 
               this.lastVisibleTab = this.visibleTab;
             },
 
             assert: function(cond) {
               if (!cond) {
                 dump("Assertion failure\n" + Error().stack);
-                throw new Error("Assertion failure");
+
+                // Don't break a user's browser if an assertion fails.
+                if (this.tabbrowser.AppConstants.DEBUG) {
+                  throw new Error("Assertion failure");
+                }
               }
             },
 
             // We've decided to try to load requestedTab.
             loadRequestedTab: function() {
               this.assert(!this.loadTimer);
               this.assert(!this.minimized);