Bug 1170343 - Use release-mode asserts when plugins making NPAPI calls on the wrong thread, r=mccr8
authorBenjamin Smedberg <benjamin@smedbergs.us>
Tue, 09 Jun 2015 15:55:21 -0400
changeset 248009 6f7f683a0ccc9d7c94a7b169fa5c681d2e624ad2
parent 248008 f537b304247e9f275459a24a76afd50ef58aa1a7
child 248010 bcd47857f212428e677ecbcf95ddd203849d182c
push id13466
push userbsmedberg@mozilla.com
push dateWed, 10 Jun 2015 15:51:06 +0000
treeherderfx-team@bcd47857f212 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmccr8
bugs1170343
milestone41.0a1
Bug 1170343 - Use release-mode asserts when plugins making NPAPI calls on the wrong thread, r=mccr8
dom/plugins/ipc/PluginMessageUtils.h
--- a/dom/plugins/ipc/PluginMessageUtils.h
+++ b/dom/plugins/ipc/PluginMessageUtils.h
@@ -195,17 +195,17 @@ inline bool IsPluginThread()
   MessageLoop* loop = MessageLoop::current();
   if (!loop)
       return false;
   return (loop->type() == MessageLoop::TYPE_UI);
 }
 
 inline void AssertPluginThread()
 {
-  NS_ASSERTION(IsPluginThread(), "Should be on the plugin's main thread!");
+  MOZ_RELEASE_ASSERT(IsPluginThread(), "Should be on the plugin's main thread!");
 }
 
 #define ENSURE_PLUGIN_THREAD(retval) \
   PR_BEGIN_MACRO \
     if (!IsPluginThread()) { \
       NS_WARNING("Not running on the plugin's main thread!"); \
       return (retval); \
     } \