Bug 1475006 - Remove mAutoProfilerLabel from AutoEntryScript in non-MOZ_GECKO_PROFILER builds r=mstange
authorNazım Can Altınova <canaltinova@gmail.com>
Thu, 12 Jul 2018 11:01:08 +0200
changeset 426581 2e302dfe1142
parent 426580 c8b52817d7f9
child 426582 a35b188d0e44
push id34276
push userncsoregi@mozilla.com
push dateSat, 14 Jul 2018 09:41:08 +0000
treeherdermozilla-central@04dd259d71db [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmstange
bugs1475006
milestone63.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 1475006 - Remove mAutoProfilerLabel from AutoEntryScript in non-MOZ_GECKO_PROFILER builds r=mstange MozReview-Commit-ID: 66mZK4q2ATK
dom/script/ScriptSettings.cpp
dom/script/ScriptSettings.h
--- a/dom/script/ScriptSettings.cpp
+++ b/dom/script/ScriptSettings.cpp
@@ -647,18 +647,20 @@ AutoJSAPI::IsStackTop() const
 AutoEntryScript::AutoEntryScript(nsIGlobalObject* aGlobalObject,
                                  const char* aReason,
                                  bool aIsMainThread)
   : AutoJSAPI(aGlobalObject, aIsMainThread, eEntryScript)
   , mWebIDLCallerPrincipal(nullptr)
   // This relies on us having a cx() because the AutoJSAPI constructor already
   // ran.
   , mCallerOverride(cx())
+#ifdef MOZ_GECKO_PROFILER
   , mAutoProfilerLabel("AutoEntryScript", aReason, __LINE__,
                        js::ProfilingStackFrame::Category::JS)
+#endif
 {
   MOZ_ASSERT(aGlobalObject);
 
   if (aIsMainThread && gRunToCompletionListeners > 0) {
     mDocShellEntryMonitor.emplace(cx(), aReason);
   }
 }
 
--- a/dom/script/ScriptSettings.h
+++ b/dom/script/ScriptSettings.h
@@ -375,17 +375,19 @@ private:
   // is the principal of the callee function that is part of the CallArgs just a
   // bit up the stack, and which will outlive us.  So we know the principal
   // can't go away until then either.
   nsIPrincipal* MOZ_NON_OWNING_REF mWebIDLCallerPrincipal;
   friend nsIPrincipal* GetWebIDLCallerPrincipal();
 
   Maybe<DocshellEntryMonitor> mDocShellEntryMonitor;
   JS::AutoHideScriptedCaller mCallerOverride;
+#ifdef MOZ_GECKO_PROFILER
   AutoProfilerLabel mAutoProfilerLabel;
+#endif
 };
 
 /*
  * A class that can be used to force a particular incumbent script on the stack.
  */
 class AutoIncumbentScript : protected ScriptSettingsStackEntry {
 public:
   explicit AutoIncumbentScript(nsIGlobalObject* aGlobalObject);