mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 691178 - Refuse to wrap windows that are on the way out. r=jst
This commit is contained in:
parent
4a2b90f233
commit
d51c4b143c
@ -5147,6 +5147,11 @@ nsWindowSH::PreCreate(nsISupports *nativeObj, JSContext *cx,
|
||||
|
||||
JSObject *winObj = win->FastGetGlobalJSObject();
|
||||
if (!winObj) {
|
||||
|
||||
// See bug 691178 comment 11 for why this is necessary.
|
||||
if (win->IsClosedOrClosing())
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
NS_ASSERTION(win->GetOuterWindowInternal()->IsCreatingInnerWindow(),
|
||||
"should have a JS object by this point");
|
||||
return NS_OK;
|
||||
|
Loading…
Reference in New Issue
Block a user