mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-02 22:08:40 +09:00
Bug 1426002. Bail out of document.open if beforeunload tears things down. r=mystor
This commit is contained in:
parent
6790fd483b
commit
29100ca13a
1 changed files with 12 additions and 0 deletions
|
|
@ -1536,6 +1536,18 @@ nsHTMLDocument::Open(JSContext* cx,
|
|||
nsCOMPtr<nsIDocument> ret = this;
|
||||
return ret.forget();
|
||||
}
|
||||
|
||||
// Now double-check that our invariants still hold.
|
||||
if (!mScriptGlobalObject) {
|
||||
nsCOMPtr<nsIDocument> ret = this;
|
||||
return ret.forget();
|
||||
}
|
||||
|
||||
nsPIDOMWindowOuter* outer = GetWindow();
|
||||
if (!outer || (GetInnerWindow() != outer->GetCurrentInnerWindow())) {
|
||||
nsCOMPtr<nsIDocument> ret = this;
|
||||
return ret.forget();
|
||||
}
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIWebNavigation> webnav(do_QueryInterface(shell));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue