This commit is contained in:
Henri Sivonen 2011-11-14 10:50:15 +02:00
Родитель a9cf72330b
Коммит 0f6c2ebd98
1 изменённых файлов: 10 добавлений и 0 удалений

Просмотреть файл

@ -1600,6 +1600,16 @@ nsHTMLDocument::Open(const nsAString& aContentTypeOrUrl,
return NS_OK;
}
// No calling document.open() without a script global object
if (!mScriptGlobalObject) {
return NS_OK;
}
nsPIDOMWindow* outer = GetWindow();
if (!outer || (GetInnerWindow() != outer->GetCurrentInnerWindow())) {
return NS_OK;
}
// check whether we're in the middle of unload. If so, ignore this call.
nsCOMPtr<nsIDocShell> shell = do_QueryReferent(mDocumentContainer);
if (!shell) {