Bug 1201239 - Add a proper null check in PluginAsyncSurrogate::NotifyAsyncInitFailed. r=jimm, a=ritu
authorAaron Klotz <aklotz@mozilla.com>
Thu, 03 Sep 2015 10:27:01 -0600
changeset 289146 a4a86b5a85fd316ace93f4759efa06600e88dbd1
parent 289145 441f51977790af03ac4555063c8d97e0600f8e08
child 289147 4426ec35d5ca0c6cafefa7f9e5949696968135d4
push id5067
push userraliiev@mozilla.com
push dateMon, 21 Sep 2015 14:04:52 +0000
treeherdermozilla-beta@14221ffe5b2f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjimm, ritu
bugs1201239
milestone42.0a2
Bug 1201239 - Add a proper null check in PluginAsyncSurrogate::NotifyAsyncInitFailed. r=jimm, a=ritu
dom/plugins/ipc/PluginAsyncSurrogate.cpp
--- a/dom/plugins/ipc/PluginAsyncSurrogate.cpp
+++ b/dom/plugins/ipc/PluginAsyncSurrogate.cpp
@@ -570,18 +570,19 @@ PluginAsyncSurrogate::NotifyAsyncInitFai
   mInitCancelled = true;
 
   nsNPAPIPluginInstance* inst =
     static_cast<nsNPAPIPluginInstance*>(mInstance->ndata);
   if (!inst) {
       return;
   }
   nsPluginInstanceOwner* owner = inst->GetOwner();
-  MOZ_ASSERT(owner);
-  owner->NotifyHostAsyncInitFailed();
+  if (owner) {
+    owner->NotifyHostAsyncInitFailed();
+  }
 }
 
 // static
 NPObject*
 PluginAsyncSurrogate::ScriptableAllocate(NPP aInstance, NPClass* aClass)
 {
   PLUGIN_LOG_DEBUG_FUNCTION;
   if (aClass != GetClass()) {