diff --git a/browser/base/content/tabbrowser.xml b/browser/base/content/tabbrowser.xml index c093fb410787..9b2116218463 100644 --- a/browser/base/content/tabbrowser.xml +++ b/browser/base/content/tabbrowser.xml @@ -1957,8 +1957,8 @@ aTab._pendingPermitUnload = true; let permitUnload = ds.contentViewer.permitUnload(); delete aTab._pendingPermitUnload; - // If we were closed during the unload, we return false now so - // we don't (try to) close the same tab again. Of course, we + // If we were closed during onbeforeunload, we return false now + // so we don't (try to) close the same tab again. Of course, we // also stop if the unload was cancelled by the user: if (aTab.closing || !permitUnload) { // NB: deliberately keep the _closedDuringPermitUnload set to diff --git a/browser/base/content/test/general/browser_double_close_tab.js b/browser/base/content/test/general/browser_double_close_tab.js index 2e1d5f70659f..2dbe0f83228c 100644 --- a/browser/base/content/test/general/browser_double_close_tab.js +++ b/browser/base/content/test/general/browser_double_close_tab.js @@ -1,4 +1,4 @@ -"use strict" +"use strict"; const TEST_PAGE = "http://mochi.test:8888/browser/browser/base/content/test/general/file_double_close_tab.html"; let testTab; @@ -43,9 +43,9 @@ add_task(function*() { // everything gets messed up and the promise's .then callbacks never get // called, despite resolve() being called just fine. let dialogNode = yield new Promise(resolveOuter => { - waitForDialog(function(dialogNode) { + waitForDialog(dialogNode => { waitForDialogDestroyed(dialogNode, () => { - let doCompletion = () => setTimeout(resolveOuter, 10); + let doCompletion = () => setTimeout(resolveOuter, 0); info("Now checking if dialog is destroyed"); ok(!dialogNode.parentNode, "onbeforeunload dialog should be gone."); if (dialogNode.parentNode) {