Bug 753659: Make refcounting threadsafety assertions fatal. r=bsmedberg

This commit is contained in:
Kyle Huey 2012-09-22 12:45:44 -07:00
parent 458f2ebcba
commit 0482dbb617

View File

@ -15,6 +15,7 @@
#endif
#include "nsXPCOM.h"
#include "mozilla/Assertions.h"
#ifdef DEBUG
#include "prprf.h"
@ -347,12 +348,9 @@
#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