Bug 941908 - Crash in nsIDocument::IsActive becuse of a null document. This would assert in debug builds, but use a wallpaper null-check in release builds also, r=johns a=lsblakk
authorBenjamin Smedberg <benjamin@smedbergs.us>
Mon, 25 Nov 2013 12:08:37 -0500
changeset 167564 5fd04506bac305c67335c6e5a3632ae3cd999588
parent 167563 b1abfdcbb1e7a0ad2030a4d28cec72f418ff056f
child 167565 9cf07c05aaceec18614a7d0059abd53836afabf1
push id428
push userbbajaj@mozilla.com
push dateTue, 28 Jan 2014 00:16:25 +0000
treeherdermozilla-release@cd72a7ff3a75 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjohns, lsblakk
bugs941908
milestone27.0a2
Bug 941908 - Crash in nsIDocument::IsActive becuse of a null document. This would assert in debug builds, but use a wallpaper null-check in release builds also, r=johns a=lsblakk
content/base/src/nsObjectLoadingContent.cpp
--- a/content/base/src/nsObjectLoadingContent.cpp
+++ b/content/base/src/nsObjectLoadingContent.cpp
@@ -246,17 +246,17 @@ private:
   nsCOMPtr<nsISupports> mTarget;
   nsCOMPtr<nsIDocument> mDocument;
   nsString mEvent;
 };
 
 NS_IMETHODIMP
 nsSimplePluginEvent::Run()
 {
-  if (mDocument->IsActive()) {
+  if (mDocument && mDocument->IsActive()) {
     LOG(("OBJLC [%p]: nsSimplePluginEvent firing event \"%s\"", mTarget.get(),
          NS_ConvertUTF16toUTF8(mEvent).get()));
     nsContentUtils::DispatchTrustedEvent(mDocument, mTarget,
                                          mEvent, true, true);
   }
   return NS_OK;
 }