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
nsGlobalWindow::AreDialogsEnabled()
{
MOZ_ASSERT(IsOuterWindow());
nsGlobalWindow *topWindow = GetScriptableTop();
if (!topWindow) {
NS_ERROR("AreDialogsEnabled() called without a top window?");

View File

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