temporary measure against infinite loop after browser_bug380960.js (bug 585361)
authorDão Gottwald <dao@mozilla.com>
Tue, 10 Aug 2010 10:48:20 +0200
changeset 49260 827919491123f5f229ce4c62ed02e8cb8038df70
parent 49259 7b8dfb676be3e574f489bf8b56491d4b5ce572ab
child 49261 0de04ae0386f5c74d5750cb3cf882db2c6ae24f6
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs380960, 585361
milestone2.0b4pre
first release with
nightly win64
827919491123 / 4.0b4pre / 20100810023608 / files
nightly linux32
nightly linux64
nightly mac
nightly win32
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly win64
temporary measure against infinite loop after browser_bug380960.js (bug 585361)
testing/mochitest/browser-test.js
--- a/testing/mochitest/browser-test.js
+++ b/testing/mochitest/browser-test.js
@@ -78,16 +78,20 @@ Tester.prototype = {
                                               : "Found an unexpected {elt}";
 
     if (this.currentTest && window.gBrowser && gBrowser.tabs.length > 1) {
       while (gBrowser.tabs.length > 1) {
         let lastTab = gBrowser.tabContainer.lastChild;
         let msg = baseMsg.replace("{elt}", "tab") +
                   ": " + lastTab.linkedBrowser.currentURI.spec;
         this.currentTest.addResult(new testResult(false, msg, "", false));
+        if (gBrowser._removingTabs && gBrowser._removingTabs.indexOf(lastTab) > -1) {
+          gBrowser._endRemoveTab(lastTab);
+          continue;
+        }
         gBrowser.removeTab(lastTab);
       }
     }
 
     this.dumper.dump("TEST-INFO | checking window state\n");
     let windowsEnum = this._wm.getEnumerator("navigator:browser");
     while (windowsEnum.hasMoreElements()) {
       let win = windowsEnum.getNext();