зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1130367 - Fix readSPSProfilingStack testing function to work right when profiler is disabled. r=shu
This commit is contained in:
Родитель
792229c28b
Коммит
a7a1fe244a
|
@ -1245,8 +1245,11 @@ ReadSPSProfilingStack(JSContext *cx, unsigned argc, jsval *vp)
|
|||
CallArgs args = CallArgsFromVp(argc, vp);
|
||||
args.rval().setUndefined();
|
||||
|
||||
if (!cx->runtime()->spsProfiler.enabled())
|
||||
// Return boolean 'false' if profiler is not enabled.
|
||||
if (!cx->runtime()->spsProfiler.enabled()) {
|
||||
args.rval().setBoolean(false);
|
||||
return true;
|
||||
}
|
||||
|
||||
// Array holding physical jit stack frames.
|
||||
RootedObject stack(cx, NewDenseEmptyArray(cx));
|
||||
|
|
|
@ -1719,6 +1719,9 @@ JS::ProfilingFrameIterator::ProfilingFrameIterator(JSRuntime *rt, const Register
|
|||
activation_(rt->profilingActivation()),
|
||||
savedPrevJitTop_(nullptr)
|
||||
{
|
||||
// Should only be instantiated when profiling is enabled.
|
||||
MOZ_ASSERT(rt_->spsProfiler.enabled());
|
||||
|
||||
if (!activation_)
|
||||
return;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче