diff --git a/js/xpconnect/src/XPCShellImpl.cpp b/js/xpconnect/src/XPCShellImpl.cpp index 9d38c61c0c9f..d083f2ca14d2 100644 --- a/js/xpconnect/src/XPCShellImpl.cpp +++ b/js/xpconnect/src/XPCShellImpl.cpp @@ -28,7 +28,6 @@ #include "nsJSPrincipals.h" #include "xpcpublic.h" #include "xpcprivate.h" -#include "xpctest_private.h" #include "BackstagePass.h" #include "nsIScriptSecurityManager.h" #include "nsIPrincipal.h" @@ -65,6 +64,10 @@ #include "nsICrashReporter.h" #endif +#ifdef ENABLE_TESTS +#include "xpctest_private.h" +#endif + using namespace mozilla; using namespace JS; using mozilla::dom::AutoJSAPI; @@ -644,6 +647,7 @@ RegisterAppManifest(JSContext* cx, unsigned argc, Value* vp) return true; } +#ifdef ENABLE_TESTS static bool RegisterXPCTestComponents(JSContext* cx, unsigned argc, Value* vp) { @@ -659,6 +663,7 @@ RegisterXPCTestComponents(JSContext* cx, unsigned argc, Value* vp) } return true; } +#endif static const JSFunctionSpec glob_functions[] = { JS_FS("print", Print, 0,0), @@ -679,7 +684,9 @@ static const JSFunctionSpec glob_functions[] = { JS_FS("setInterruptCallback", SetInterruptCallback, 1,0), JS_FS("simulateActivityCallback", SimulateActivityCallback, 1,0), JS_FS("registerAppManifest", RegisterAppManifest, 1, 0), +#ifdef ENABLE_TESTS JS_FS("registerXPCTestComponents", RegisterXPCTestComponents, 0, 0), +#endif JS_FS_END };