Bug 852847 - Part 5: Fix assertions caused by part 4. r=me
authorJustin Lebar <justin.lebar@gmail.com>
Mon, 29 Apr 2013 18:12:11 -0400
changeset 130237 1402432b52a2fcf5682e88fa8cb5ffe358352f82
parent 130236 f9969228d97363ff224df38032e8a4f6376d2dc0
child 130238 d0de51607902b7ab313b2f3ae754b94c5242af7f
push id24608
push useremorley@mozilla.com
push dateTue, 30 Apr 2013 09:38:03 +0000
treeherdermozilla-central@60e522be9d08 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme
bugs852847
milestone23.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 852847 - Part 5: Fix assertions caused by part 4. r=me
dom/browser-element/BrowserElementChildPreload.js
--- a/dom/browser-element/BrowserElementChildPreload.js
+++ b/dom/browser-element/BrowserElementChildPreload.js
@@ -321,17 +321,19 @@ BrowserElementChild.prototype = {
     if (innerWindowID !== this._tryGetInnerWindowID(win)) {
       throw Components.Exception("Modal state aborted by navigation",
                                  Cr.NS_ERROR_NOT_AVAILABLE);
     }
 
     let returnValue = win.modalReturnValue;
     delete win.modalReturnValue;
 
-    utils.leaveModalStateWithWindow(modalStateWin);
+    if (!this._shuttingDown) {
+      utils.leaveModalStateWithWindow(modalStateWin);
+    }
 
     debug("Leaving modal state (outerID=" + outerWindowID + ", " +
                                "innerID=" + innerWindowID + ")");
     return returnValue;
   },
 
   _recvStopWaiting: function(msg) {
     let outerID = msg.json.windowID.outer;