Bug 964891. Don't put up a slow script dialog for no-longer-current inners. Just kill the script instead. r=smaug

This commit is contained in:
Boris Zbarsky 2014-01-29 22:32:57 -08:00
parent 5f00132e5d
commit e31f8a4e76

View File

@ -10491,6 +10491,11 @@ nsGlobalWindow::ShowSlowScriptDialog()
return KillSlowScript;
}
// If our document is not active, just kill the script: we've been unloaded
if (!HasActiveDocument()) {
return KillSlowScript;
}
// Get the nsIPrompt interface from the docshell
nsCOMPtr<nsIDocShell> ds = GetDocShell();
NS_ENSURE_TRUE(ds, KillSlowScript);