Try to fix orange from d468bf98f7a1 (Fix for bug 603531 ("ASSERTION: bad outer object hook" and crash [@ js::gc::Cell::compartment]), compartments followup.)

--HG--
extra : rebase_source : 26ed7548f57836136162e6830034d0e40bf0853b
This commit is contained in:
Peter Van der Beken 2010-10-12 17:25:34 -07:00
parent 7824df9649
commit 5bb4dd3d8c

View File

@ -2188,7 +2188,8 @@ nsGlobalWindow::SetDocShell(nsIDocShell* aDocShell)
for (nsRefPtr<nsGlobalWindow> inner = (nsGlobalWindow *)PR_LIST_HEAD(this);
inner != this;
inner = (nsGlobalWindow*)PR_NEXT_LINK(inner)) {
NS_ASSERTION(inner->mOuterWindow == this, "bad outer window pointer");
NS_ASSERTION(!inner->mOuterWindow || inner->mOuterWindow == this,
"bad outer window pointer");
inner->FreeInnerObjects(PR_TRUE);
}
@ -7244,7 +7245,8 @@ nsGlobalWindow::SetChromeEventHandler(nsPIDOMEventTarget* aChromeEventHandler)
for (nsGlobalWindow *inner = (nsGlobalWindow *)PR_LIST_HEAD(this);
inner != this;
inner = (nsGlobalWindow*)PR_NEXT_LINK(inner)) {
NS_ASSERTION(inner->mOuterWindow == this, "bad outer window pointer");
NS_ASSERTION(!inner->mOuterWindow || inner->mOuterWindow == this,
"bad outer window pointer");
inner->SetChromeEventHandlerInternal(aChromeEventHandler);
}
} else if (mOuterWindow) {