Bug 1373096 - Unbreak --enable-warnings-as-errors build without GeckoProfiler after
bug 1372901. r?mstange
MozReview-Commit-ID: ABh2bw5CbFm
--- 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 =