Bug 691178 - Refuse to wrap windows that are on the way out. r=jst

This commit is contained in:
Bobby Holley 2012-02-29 18:09:16 -08:00
Родитель 8cff28c7f2
Коммит b226332e2e
1 изменённых файлов: 5 добавлений и 0 удалений

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

@ -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;