Bug 604449 - Protect against an outer window that has already been closed. r=jst

--HG--
extra : transplant_source : d%82D1%05%CA%B9%7F%04%7C%C7%0B%A7%85%40A%13%2B%20%20
This commit is contained in:
Blake Kaplan 2010-10-25 12:15:04 -07:00
parent 442be7263a
commit 4a0c50347c

View File

@ -5814,7 +5814,7 @@ nsDOMConstructor::Create(const PRUnichar* aName,
nsPIDOMWindow* outerWindow = aOwner->GetOuterWindow();
nsPIDOMWindow* currentInner =
outerWindow ? outerWindow->GetCurrentInnerWindow() : aOwner;
if (!outerWindow ||
if (!currentInner ||
(aOwner != currentInner &&
!nsContentUtils::CanCallerAccess(currentInner) &&
!(currentInner = aOwner)->IsInnerWindow())) {