Bug 1468928 - Unbreak build without GeckoProfiler after bug 1405374. r=mstange
authorJan Beich <jbeich@FreeBSD.org>
Fri, 15 Jun 2018 10:12:23 +0000
changeset 422819 4a23e67e1d2a863f1465c6eb94d0f7c52a6eebbc
parent 422815 628bd444ead118e3c634f5ec135313e76023f384
child 422820 5eb03fb6bb4fa39b3b22ac18eab3509992fd9f5b
push id34152
push usercsabou@mozilla.com
push dateMon, 18 Jun 2018 15:51:00 +0000
treeherdermozilla-central@97eb512f532b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmstange
bugs1468928, 1405374
milestone62.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1468928 - Unbreak build without GeckoProfiler after bug 1405374. r=mstange In file included from objdir/js/xpconnect/src/Unified_cpp_js_xpconnect_src1.cpp:110: js/xpconnect/src/nsXPConnect.cpp:76:37: error: use of undeclared identifier 'profiler_register_thread' JS::SetProfilingThreadCallbacks(profiler_register_thread, profiler_unregister_thread); ^ js/xpconnect/src/nsXPConnect.cpp:76:63: error: use of undeclared identifier 'profiler_unregister_thread' JS::SetProfilingThreadCallbacks(profiler_register_thread, profiler_unregister_thread); ^ MozReview-Commit-ID: HrBGEkByEum
js/xpconnect/src/nsXPConnect.cpp
--- a/js/xpconnect/src/nsXPConnect.cpp
+++ b/js/xpconnect/src/nsXPConnect.cpp
@@ -68,17 +68,19 @@ const char XPC_XPCONNECT_CONTRACTID[]   
 // nsXPConnect and when creating a new cooperative (non-primary) XPCJSContext.
 static XPCJSContext* gPrimaryContext;
 
 nsXPConnect::nsXPConnect()
     : mShuttingDown(false)
 {
     XPCJSContext::InitTLS();
 
+#ifdef MOZ_GECKO_PROFILER
     JS::SetProfilingThreadCallbacks(profiler_register_thread, profiler_unregister_thread);
+#endif
 
     XPCJSContext* xpccx = XPCJSContext::NewXPCJSContext(nullptr);
     if (!xpccx) {
         MOZ_CRASH("Couldn't create XPCJSContext.");
     }
     gPrimaryContext = xpccx;
     mRuntime = xpccx->Runtime();
 }