diff --git a/browser/installer/Makefile.in b/browser/installer/Makefile.in index 5282ef69261..09600ed9d1b 100644 --- a/browser/installer/Makefile.in +++ b/browser/installer/Makefile.in @@ -101,6 +101,10 @@ ifneq (,$(filter WINNT Darwin Android,$(OS_TARGET))) DEFINES += -DMOZ_SHARED_MOZGLUE=1 endif +ifdef MOZ_JSDEBUGGER +DEFINES += -DMOZ_JSDEBUGGER +endif + ifdef MOZ_PKG_MANIFEST_P MOZ_PKG_MANIFEST = package-manifest diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in index 33e9afea62f..525e40bf366 100644 --- a/browser/installer/package-manifest.in +++ b/browser/installer/package-manifest.in @@ -199,7 +199,9 @@ @BINPATH@/components/inspector.xpt @BINPATH@/components/intl.xpt @BINPATH@/components/jar.xpt +#ifdef MOZ_JSDEBUGGER @BINPATH@/components/jsdservice.xpt +#endif @BINPATH@/components/jsdebugger.xpt @BINPATH@/components/jsinspector.xpt @BINPATH@/components/layout_base.xpt diff --git a/js/xpconnect/src/Makefile.in b/js/xpconnect/src/Makefile.in index 7dc781291a3..7814dda3cfb 100644 --- a/js/xpconnect/src/Makefile.in +++ b/js/xpconnect/src/Makefile.in @@ -121,6 +121,10 @@ DEFINES += \ -DNO_NSPR_10_SUPPORT \ $(NULL) +ifdef MOZ_JSDEBUGGER +DEFINES += -DMOZ_JSDEBUGGER +endif + ifeq ($(OS_ARCH),WINNT) ifndef GNU_CXX ifeq (,$(filter-out 1200 1300 1310,$(_MSC_VER))) diff --git a/js/xpconnect/src/nsXPConnect.cpp b/js/xpconnect/src/nsXPConnect.cpp index 2912907805c..414ed8663ba 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()