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 248147 6f7f683a0ccc9d7c94a7b169fa5c681d2e624ad2
parent 248146 f537b304247e9f275459a24a76afd50ef58aa1a7
child 248148 bcd47857f212428e677ecbcf95ddd203849d182c
push id60888
push userkwierso@gmail.com
push dateThu, 11 Jun 2015 01:38:38 +0000
treeherdermozilla-inbound@39e638ed06bf [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmccr8
bugs1170343
milestone41.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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); \
     } \