Bug 1349887 - Remove obsolete comment about non-existent _closedDuringPermitUnload flag. r?gijs
MozReview-Commit-ID: ATYav9S2FGG
--- a/browser/base/content/tabbrowser.xml
+++ b/browser/base/content/tabbrowser.xml
@@ -2651,34 +2651,31 @@
return false;
var browser = this.getBrowserForTab(aTab);
if (!aTab._pendingPermitUnload &&
!aSkipPermitUnload &&
aTab.linkedPanel &&
!aAdoptedByTab) {
+ TelemetryStopwatch.start("FX_TAB_CLOSE_PERMIT_UNLOAD_TIME_MS", aTab);
+
// We need to block while calling permitUnload() because it
// processes the event queue and may lead to another removeTab()
// call before permitUnload() returns.
-
- TelemetryStopwatch.start("FX_TAB_CLOSE_PERMIT_UNLOAD_TIME_MS", aTab);
-
aTab._pendingPermitUnload = true;
let {permitUnload, timedOut} = browser.permitUnload();
delete aTab._pendingPermitUnload;
TelemetryStopwatch.finish("FX_TAB_CLOSE_PERMIT_UNLOAD_TIME_MS", aTab);
// 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 || (!timedOut && !permitUnload)) {
- // NB: deliberately keep the _closedDuringPermitUnload set to
- // true so we keep exiting early in case of multiple calls.
return false;
}
}
var closeWindow = false;
var newTab = false;
if (this.tabs.length - this._removingTabs.length == 1) {