Bug 1140616 - Crash when _releaseobject is called on the wrong thread. r=bsmedberg, a=sledru
authorJan de Mooij <jdemooij@mozilla.com>
Tue, 25 Aug 2015 13:11:41 +0200
changeset 277349 6a513309283d06f56cebee8528cfcf134a74f3c4
parent 277348 cb8eea12b505c0efd38f4caa5318bcd6d1a988fc
child 277350 6929efd5d98edc882c7261c0c589b59beee5e6e5
push id8358
push userryanvm@gmail.com
push dateFri, 28 Aug 2015 13:45:45 +0000
treeherdermozilla-aurora@56bdc151e79f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbsmedberg, sledru
bugs1140616
milestone42.0a2
Bug 1140616 - Crash when _releaseobject is called on the wrong thread. r=bsmedberg, a=sledru
dom/plugins/base/nsNPAPIPlugin.cpp
--- a/dom/plugins/base/nsNPAPIPlugin.cpp
+++ b/dom/plugins/base/nsNPAPIPlugin.cpp
@@ -1391,16 +1391,17 @@ NPObject*
   return npobj;
 }
 
 void
 _releaseobject(NPObject* npobj)
 {
   if (!NS_IsMainThread()) {
     NPN_PLUGIN_LOG(PLUGIN_LOG_ALWAYS,("NPN_releaseobject called from the wrong thread\n"));
+    MOZ_CRASH("NPN_releaseobject called from the wrong thread");
   }
   if (!npobj)
     return;
 
   int32_t refCnt = PR_ATOMIC_DECREMENT((int32_t*)&npobj->referenceCount);
   NS_LOG_RELEASE(npobj, refCnt, "BrowserNPObject");
 
   if (refCnt == 0) {