Bug 1373096 - Unbreak --enable-warnings-as-errors build without GeckoProfiler after bug 1372901. r?mstange draft
authorJan Beich <jbeich@FreeBSD.org>
Thu, 15 Jun 2017 01:37:26 +0000
changeset 594424 29d7a545a458e3d0a4e2b25f67ea9271ffcbfb01
parent 594423 9e55fa371ece8761738b96cb03bb85662469e4b0
child 633419 d70b374993fa8dcc0d63a049a372bb6d116e72e8
push id64024
push userbmo:jbeich@FreeBSD.org
push dateThu, 15 Jun 2017 01:43:25 +0000
reviewersmstange
bugs1373096, 1372901
milestone56.0a1
Bug 1373096 - Unbreak --enable-warnings-as-errors build without GeckoProfiler after bug 1372901. r?mstange MozReview-Commit-ID: ABh2bw5CbFm
js/xpconnect/src/XPCComponents.cpp
--- a/js/xpconnect/src/XPCComponents.cpp
+++ b/js/xpconnect/src/XPCComponents.cpp
@@ -2498,20 +2498,22 @@ nsXPCComponents_Utils::Import(const nsAC
                               uint8_t optionalArgc,
                               MutableHandleValue retval)
 {
     nsCOMPtr<xpcIJSModuleLoader> moduleloader =
         do_GetService(MOZJSCOMPONENTLOADER_CONTRACTID);
     if (!moduleloader)
         return NS_ERROR_FAILURE;
 
+#ifdef MOZ_GECKO_PROFILER
     const nsCString& flatLocation = PromiseFlatCString(registryLocation);
     PROFILER_LABEL_DYNAMIC("Components.utils", "import",
                            js::ProfileEntry::Category::OTHER,
                            flatLocation.get());
+#endif
 
     return moduleloader->Import(registryLocation, targetObj, cx, optionalArgc, retval);
 }
 
 NS_IMETHODIMP
 nsXPCComponents_Utils::IsModuleLoaded(const nsACString& registryLocation, bool* retval)
 {
     nsCOMPtr<xpcIJSModuleLoader> moduleloader =