Bug 1191973 - abortPrompt when removing it because the user switched tabs, r=dolske
authorGijs Kruitbosch <gijskruitbosch@gmail.com>
Fri, 14 Aug 2015 14:43:12 +0100
changeset 258178 a95f3ce712f7cfac1a5146d7767d361295e77eb8
parent 258177 95e78f3ea1f5d96c342595f05275d2c410a5d2db
child 258179 58f0dc56ac34ff4ee9e39409e75fb447dd964bdf
push id63843
push userryanvm@gmail.com
push dateTue, 18 Aug 2015 14:58:06 +0000
treeherdermozilla-inbound@d55e24c983aa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdolske
bugs1191973
milestone43.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 1191973 - abortPrompt when removing it because the user switched tabs, r=dolske
browser/base/content/tabbrowser.xml
--- a/browser/base/content/tabbrowser.xml
+++ b/browser/base/content/tabbrowser.xml
@@ -1203,17 +1203,17 @@
                 let prompts = promptBox.listPrompts();
                 // There might not be any prompts here if the tab was closed
                 // while in an onbeforeunload prompt, which will have
                 // destroyed aforementioned prompt already, so check there's
                 // something to remove, first:
                 if (prompts.length) {
                   // NB: This code assumes that the beforeunload prompt
                   //     is the top-most prompt on the tab.
-                  promptBox.removePrompt(prompts[prompts.length - 1]);
+                  prompts[prompts.length - 1].abortPrompt();
                 }
               }
 
               oldBrowser._urlbarFocused = (gURLBar && gURLBar.focused);
               if (this.isFindBarInitialized(oldTab)) {
                 let findBar = this.getFindBar(oldTab);
                 oldTab._findBarFocused = (!findBar.hidden &&
                   findBar._findField.getAttribute("focused") == "true");