Bug 1724236 - Move profiler label and JSAutoRealm out of JSExecutionContext r=arai

Differential Revision: https://phabricator.services.mozilla.com/D218444
This commit is contained in:
Bryan Thrall
2024-10-30 13:41:40 +00:00
parent 2a63e2261f
commit 2f6237583a
5 changed files with 13 additions and 11 deletions

View File

@@ -3009,6 +3009,10 @@ nsresult ScriptLoader::EvaluateScript(nsIGlobalObject* aGlobalObject,
if (erv.Failed()) {
return EvaluationExceptionToNSResult(erv);
}
mozilla::AutoProfilerLabel autoProfilerLabel("JSExecutionContext",
/* dynamicStr */ nullptr,
JS::ProfilingCategoryPair::JS);
JSAutoRealm autoRealm(cx, global);
InstantiateClassicScriptFromAny(cx, exec, options, aRequest, erv);
if (!erv.Failed()) {