[js] Fix invalid early return in BaselineFrame::trace.

We were not tracing debugger environments for Baseline frames without any
local/expression slots.
This commit is contained in:
Jan de Mooij 2021-06-02 10:29:47 +00:00 • committed by roytam1
commit 9c3495379f

View file

@ -62,8 +62,7 @@ BaselineFrame::trace(JSTracer* trc, JitFrameIterator& frameIterator)
// NB: It is possible that numValueSlots() could be zero, even if nfixed is
// nonzero. This is the case if the function has an early stack check.
if (numValueSlots() == 0)
return;
if (numValueSlots > 0) {
MOZ_ASSERT(nfixed <= numValueSlots());
@ -81,6 +80,7 @@ BaselineFrame::trace(JSTracer* trc, JitFrameIterator& frameIterator)
// Mark live locals.
MarkLocals(this, trc, 0, nlivefixed);
}
}
if (script->compartment()->debugEnvs)
script->compartment()->debugEnvs->markLiveFrame(trc, this);