зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1452982 part 5 - Refactor JitRuntime::isOptimizationTrackingEnabled to take a JSRuntime* instead of ZoneGroup*. r=jonco
This commit is contained in:
Родитель
1b0f7474cb
Коммит
5431bd4e97
|
@ -2028,7 +2028,7 @@ TrackPropertiesForSingletonScopes(JSContext* cx, JSScript* script, BaselineFrame
|
||||||
static void
|
static void
|
||||||
TrackIonAbort(JSContext* cx, JSScript* script, jsbytecode* pc, const char* message)
|
TrackIonAbort(JSContext* cx, JSScript* script, jsbytecode* pc, const char* message)
|
||||||
{
|
{
|
||||||
if (!cx->runtime()->jitRuntime()->isOptimizationTrackingEnabled(cx->zone()->group()))
|
if (!cx->runtime()->jitRuntime()->isOptimizationTrackingEnabled(cx->runtime()))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Only bother tracking aborts of functions we're attempting to
|
// Only bother tracking aborts of functions we're attempting to
|
||||||
|
|
|
@ -288,8 +288,8 @@ class JitRuntime
|
||||||
return rt->geckoProfiler().enabled();
|
return rt->geckoProfiler().enabled();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isOptimizationTrackingEnabled(ZoneGroup* group) {
|
bool isOptimizationTrackingEnabled(JSRuntime* rt) {
|
||||||
return isProfilerInstrumentationEnabled(group->runtime);
|
return isProfilerInstrumentationEnabled(rt);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
|
|
@ -5934,7 +5934,7 @@ ReflectTrackedOptimizations(JSContext* cx, unsigned argc, Value* vp)
|
||||||
RootedObject callee(cx, &args.callee());
|
RootedObject callee(cx, &args.callee());
|
||||||
JSRuntime* rt = cx->runtime();
|
JSRuntime* rt = cx->runtime();
|
||||||
|
|
||||||
if (!rt->hasJitRuntime() || !rt->jitRuntime()->isOptimizationTrackingEnabled(cx->zone()->group())) {
|
if (!rt->hasJitRuntime() || !rt->jitRuntime()->isOptimizationTrackingEnabled(cx->runtime())) {
|
||||||
JS_ReportErrorASCII(cx, "Optimization tracking is off.");
|
JS_ReportErrorASCII(cx, "Optimization tracking is off.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче