mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-13 05:15:45 +00:00
Bug 578150: Protect against the docshell loosing its document before we've had time to notify on it. r=mrbkap
This commit is contained in:
parent
093feb20dd
commit
24dea5b72b
@ -2163,6 +2163,10 @@ nsGlobalWindow::SetNewDocument(nsIDocument* aDocument,
|
||||
void
|
||||
nsGlobalWindow::DispatchDOMWindowCreated()
|
||||
{
|
||||
if (!mDoc || !mDocument) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Fire DOMWindowCreated at chrome event listeners
|
||||
nsContentUtils::DispatchChromeEvent(mDoc, mDocument, NS_LITERAL_STRING("DOMWindowCreated"),
|
||||
PR_TRUE /* bubbles */,
|
||||
|
Loading…
Reference in New Issue
Block a user