mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 20:05:49 +00:00
Bug 1318195 - Only build RegisterXPCTestComponents if tests are enabled. r=froydnj
--HG-- extra : rebase_source : b02e7acb1299a816be1f182fc7c1821f1d566ee7
This commit is contained in:
parent
fa484fb4be
commit
85a696c413
@ -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
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user