Commit 24dea5b7 authored by Jonas Sicking's avatar Jonas Sicking
Browse files

Bug 578150: Protect against the docshell loosing its document before we've had...

Bug 578150: Protect against the docshell loosing its document before we've had time to notify on it. r=mrbkap
parent 093feb20
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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 */,