Bug 753659: Make refcounting threadsafety assertions fatal. r=bsmedberg
authorKyle Huey <khuey@kylehuey.com>
Sat, 22 Sep 2012 12:45:44 -0700
changeset 107824 9d285bedbc1f2ff03db780382ceaf56a7dea3180
parent 107823 a1f06437a8d2417df9df99b2ba9e024dd5714553
child 107825 3f95fd3795b615b9686d3f34ca0b47d4c271b47c
push id23510
push userkhuey@mozilla.com
push dateSat, 22 Sep 2012 22:46:15 +0000
treeherdermozilla-central@9d285bedbc1f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbsmedberg
bugs753659
milestone18.0a1
first release with
nightly linux32
9d285bedbc1f / 18.0a1 / 20120923030601 / files
nightly linux64
9d285bedbc1f / 18.0a1 / 20120923030601 / files
nightly mac
9d285bedbc1f / 18.0a1 / 20120923030601 / files
nightly win32
9d285bedbc1f / 18.0a1 / 20120923030601 / files
nightly win64
9d285bedbc1f / 18.0a1 / 20120923030601 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 753659: Make refcounting threadsafety assertions fatal. r=bsmedberg
xpcom/glue/nsDebug.h
--- a/xpcom/glue/nsDebug.h
+++ b/xpcom/glue/nsDebug.h
@@ -10,16 +10,17 @@
 #include "nscore.h"
 #endif
 
 #ifndef nsError_h__
 #include "nsError.h"
 #endif 
 
 #include "nsXPCOM.h"
+#include "mozilla/Assertions.h"
 
 #ifdef DEBUG
 #include "prprf.h"
 #endif
 
 #include "prtypes.h"
 
 #ifdef DEBUG
@@ -342,22 +343,19 @@
 
 #define NS_ENSURE_PROPER_AGGREGATION(outer, iid)              \
   NS_ENSURE_FALSE(outer && !iid.Equals(NS_GET_IID(nsISupports)), NS_ERROR_INVALID_ARG)
 
 /*****************************************************************************/
 
 #ifdef XPCOM_GLUE
   #define NS_CheckThreadSafe(owningThread, msg)
-#elif defined MOZ_FATAL_ASSERTIONS_FOR_THREAD_SAFETY
-  #define NS_CheckThreadSafe(owningThread, msg)                 \
-    NS_ABORT_IF_FALSE(owningThread == PR_GetCurrentThread(), msg)
 #else
   #define NS_CheckThreadSafe(owningThread, msg)                 \
-    NS_ASSERTION(owningThread == PR_GetCurrentThread(), msg)
+    MOZ_ASSERT(owningThread == PR_GetCurrentThread(), msg)
 #endif
 
 /* When compiling the XPCOM Glue on Windows, we pretend that it's going to
  * be linked with a static CRT (-MT) even when it's not. This means that we
  * cannot link to data exports from the CRT, only function exports. So,
  * instead of referencing "stderr" directly, use fdopen.
  */
 #ifdef __cplusplus