From 8930ab720457c549a67a27743408009ae4675603 Mon Sep 17 00:00:00 2001 From: Prabindh Sundareson Date: Thu, 15 Mar 2012 20:12:45 -0400 Subject: [PATCH] Bug 735594 - Add check for MOZ_JSDEBUGGER so that --enable-jsd=no works. r=bholley --- js/xpconnect/src/nsXPConnect.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/js/xpconnect/src/nsXPConnect.cpp b/js/xpconnect/src/nsXPConnect.cpp index 2912907805c..e9978f32c7d 100644 --- a/js/xpconnect/src/nsXPConnect.cpp +++ b/js/xpconnect/src/nsXPConnect.cpp @@ -63,7 +63,9 @@ #include "WrapperFactory.h" #include "AccessCheck.h" +#ifdef MOZ_JSDEBUGGER #include "jsdIDebuggerService.h" +#endif #include "XPCQuickStubs.h" #include "dombindings.h" @@ -2443,8 +2445,10 @@ nsXPConnect::Peek(JSContext * *_retval) return NS_OK; } +#ifdef MOZ_JSDEBUGGER void -nsXPConnect::CheckForDebugMode(JSRuntime *rt) { +nsXPConnect::CheckForDebugMode(JSRuntime *rt) +{ JSContext *cx = NULL; if (gDebugMode == gDesiredDebugMode) { @@ -2511,6 +2515,14 @@ fail: JS_SetRuntimeDebugMode(rt, false); gDesiredDebugMode = gDebugMode = false; } +#else //MOZ_JSDEBUGGER not defined +void +nsXPConnect::CheckForDebugMode(JSRuntime *rt) +{ + gDesiredDebugMode = gDebugMode = false; +} +#endif //#ifdef MOZ_JSDEBUGGER + NS_EXPORT_(void) xpc_ActivateDebugMode()