Bug 1248896 - don't conditional compile on config ENABLE_TESTS in Nuwa. r=khuey

This commit is contained in:
Cervantes Yu 2016-02-18 15:33:59 +08:00
parent ff7604e68d
commit 0b0aa6da47
3 changed files with 5 additions and 6 deletions

View File

@ -16,7 +16,7 @@
#include "mozilla/dom/ContentParent.h"
#include "mozilla/dom/PNuwa.h"
#include "mozilla/hal_sandbox/PHal.h"
#if defined(DEBUG) || defined(ENABLE_TESTS)
#ifdef DEBUG
#include "jsprf.h"
extern "C" char* PrintJSStack();
#endif
@ -202,18 +202,17 @@ ProcessLink::SendMessage(Message *msg)
}
}
#if defined(DEBUG)
// Nuwa to parent: check whether we are currently blocked.
if (IsNuwaProcess() && mIsBlocked) {
#if defined(ENABLE_TESTS) || defined(DEBUG)
char* jsstack = PrintJSStack();
printf_stderr("Fatal error: sending a message to the chrome process"
"with a blocked IPC channel from \n%s",
jsstack ? jsstack : "<no JS stack>");
JS_smprintf_free(jsstack);
MOZ_CRASH();
#endif
}
#endif
#endif
mIOLoop->PostTask(

View File

@ -2077,7 +2077,7 @@ IsNuwaReady() {
return sNuwaReady;
}
#if defined(DEBUG) || defined(ENABLE_TESTS)
#if defined(DEBUG)
MFBT_API void
NuwaAssertNotFrozen(unsigned int aThread, const char* aThreadName) {
if (!sIsNuwaProcess || !sIsFreezing) {

View File

@ -187,7 +187,7 @@ MFBT_API bool IsNuwaProcess();
*/
MFBT_API bool IsNuwaReady();
#if defined(DEBUG) || defined(ENABLE_TESTS)
#if defined(DEBUG)
/**
* Asserts that aThread is not frozen.
*/