From 0b0aa6da47b05dea940792cfdf62bd230380ca04 Mon Sep 17 00:00:00 2001 From: Cervantes Yu Date: Thu, 18 Feb 2016 15:33:59 +0800 Subject: [PATCH] Bug 1248896 - don't conditional compile on config ENABLE_TESTS in Nuwa. r=khuey --- ipc/glue/MessageLink.cpp | 7 +++---- mozglue/build/Nuwa.cpp | 2 +- mozglue/build/Nuwa.h | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/ipc/glue/MessageLink.cpp b/ipc/glue/MessageLink.cpp index 14edb93b00a..75e12500086 100644 --- a/ipc/glue/MessageLink.cpp +++ b/ipc/glue/MessageLink.cpp @@ -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 : ""); JS_smprintf_free(jsstack); MOZ_CRASH(); -#endif } - +#endif #endif mIOLoop->PostTask( diff --git a/mozglue/build/Nuwa.cpp b/mozglue/build/Nuwa.cpp index 42d9bad34a3..4be83e69960 100644 --- a/mozglue/build/Nuwa.cpp +++ b/mozglue/build/Nuwa.cpp @@ -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) { diff --git a/mozglue/build/Nuwa.h b/mozglue/build/Nuwa.h index 37c8baebf60..13d71ebfef0 100644 --- a/mozglue/build/Nuwa.h +++ b/mozglue/build/Nuwa.h @@ -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. */