Bug 968804 - Part g: Add outer window assertions to AreDialogsEnabled; r=peterv

This commit is contained in:
Ms2ger 2014-05-20 21:50:59 +02:00
parent cabf378984
commit 50eed20628
2 changed files with 3 additions and 0 deletions

View File

@ -3071,6 +3071,8 @@ nsGlobalWindow::ShouldPromptToBlockDialogs()
bool bool
nsGlobalWindow::AreDialogsEnabled() nsGlobalWindow::AreDialogsEnabled()
{ {
MOZ_ASSERT(IsOuterWindow());
nsGlobalWindow *topWindow = GetScriptableTop(); nsGlobalWindow *topWindow = GetScriptableTop();
if (!topWindow) { if (!topWindow) {
NS_ERROR("AreDialogsEnabled() called without a top window?"); NS_ERROR("AreDialogsEnabled() called without a top window?");

View File

@ -563,6 +563,7 @@ public:
// (alert, prompt, confirm) are currently allowed in this window. // (alert, prompt, confirm) are currently allowed in this window.
void EnableDialogs(); void EnableDialogs();
void DisableDialogs(); void DisableDialogs();
// Outer windows only.
bool AreDialogsEnabled(); bool AreDialogsEnabled();
nsIScriptContext *GetContextInternal() nsIScriptContext *GetContextInternal()