diff --git a/dom/script/ScriptLoader.cpp b/dom/script/ScriptLoader.cpp index 51cedfa69119..aa0d3f8017cc 100644 --- a/dom/script/ScriptLoader.cpp +++ b/dom/script/ScriptLoader.cpp @@ -1431,14 +1431,6 @@ bool ScriptLoader::ProcessScriptElement(nsIScriptElement* aElement) { NS_ASSERTION(!aElement->IsMalformed(), "Executing malformed script"); - nsAutoCString url; - nsCOMPtr scriptURI = aElement->GetScriptURI(); - if (scriptURI) { - scriptURI->GetAsciiSpec(url); - } - AUTO_PROFILER_LABEL_DYNAMIC_NSCSTRING("ScriptLoader::ProcessScriptElement", - JS, url); - nsCOMPtr scriptContent = do_QueryInterface(aElement); nsAutoString type; @@ -2462,6 +2454,49 @@ static nsresult ExecuteCompiledScript(JSContext* aCx, return aExec.ExecScript(); } +static void GetProfilerLabelForRequest(ScriptLoadRequest* aRequest, + nsACString& aOutString) { +#ifdef MOZ_GECKO_PROFILER + if (!profiler_is_active()) { + aOutString.Append("