зеркало из https://github.com/mozilla/gecko-dev.git
Back out 827420c6b756 (bug 700080) to investigate browser-chrome leaking
This commit is contained in:
Родитель
0c4f021c94
Коммит
4468ca7eb9
|
@ -1599,11 +1599,6 @@
|
|||
evt.initUIEvent("TabClose", true, false, window, aTabWillBeMoved ? 1 : 0);
|
||||
aTab.dispatchEvent(evt);
|
||||
|
||||
// Prevent this tab from showing further dialogs, since we're closing it
|
||||
var windowUtils = browser.contentWindow.QueryInterface(Ci.nsIInterfaceRequestor).
|
||||
getInterface(Ci.nsIDOMWindowUtils);
|
||||
windowUtils.preventFurtherDialogs();
|
||||
|
||||
// Remove the tab's filter and progress listener.
|
||||
const filter = this.mTabFilters[aTab._tPos];
|
||||
#ifdef MOZ_E10S_COMPAT
|
||||
|
|
|
@ -1936,8 +1936,3 @@ nsDOMWindowUtils::CheckAndClearPaintedState(nsIDOMElement* aElement, bool* aResu
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDOMWindowUtils::PreventFurtherDialogs() {
|
||||
mWindow->PreventFurtherDialogs();
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
@ -2627,7 +2627,10 @@ nsGlobalWindow::AreDialogsBlocked()
|
|||
|
||||
topWindow = topWindow->GetCurrentInnerWindowInternal();
|
||||
|
||||
return !topWindow || topWindow->mDialogDisabled;
|
||||
return !topWindow ||
|
||||
(topWindow->mDialogDisabled &&
|
||||
(topWindow->GetPopupControlState() > openAllowed ||
|
||||
topWindow->mDialogAbuseCount >= MAX_DIALOG_COUNT));
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
|
@ -926,9 +926,4 @@ interface nsIDOMWindowUtils : nsISupports {
|
|||
*/
|
||||
boolean checkAndClearPaintedState(in nsIDOMElement aElement);
|
||||
|
||||
/**
|
||||
* Prevent this window (and any child windows) from displaying any further
|
||||
* dialogs (e.g. window.alert()).
|
||||
*/
|
||||
void preventFurtherDialogs();
|
||||
};
|
||||
|
|
Загрузка…
Ссылка в новой задаче