зеркало из https://github.com/mozilla/gecko-dev.git
Bug 691178 - Refuse to wrap windows that are on the way out. r=jst
This commit is contained in:
Родитель
8cff28c7f2
Коммит
b226332e2e
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче