summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorJan de Mooij <jdemooij@mozilla.com>2021-06-02 10:29:47 +0000
committerMoonchild <moonchild@palemoon.org>2021-06-02 10:29:47 +0000
commit9a7bb24499a93e4fa182a4f7f819f5d61a47ca89 (patch)
tree629b86b40cb9145711bd9d72536dfb4d75723d06 /js
parent4abedc4d30eec06a70ef2005031602e502e40ad7 (diff)
downloadaura-central-9a7bb24499a93e4fa182a4f7f819f5d61a47ca89.tar.gz
[js] Fix invalid early return in BaselineFrame::trace.
We were not tracing debugger environments for Baseline frames without any local/expression slots.
Diffstat (limited to 'js')
-rw-r--r--js/src/jit/BaselineFrame.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/js/src/jit/BaselineFrame.cpp b/js/src/jit/BaselineFrame.cpp
index b8c61300f..3f00e9b36 100644
--- a/js/src/jit/BaselineFrame.cpp
+++ b/js/src/jit/BaselineFrame.cpp
@@ -62,24 +62,24 @@ 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());
+ MOZ_ASSERT(nfixed <= numValueSlots());
- if (nfixed == nlivefixed) {
- // All locals are live.
- MarkLocals(this, trc, 0, numValueSlots());
- } else {
- // Mark operand stack.
- MarkLocals(this, trc, nfixed, numValueSlots());
+ if (nfixed == nlivefixed) {
+ // All locals are live.
+ MarkLocals(this, trc, 0, numValueSlots());
+ } else {
+ // Mark operand stack.
+ MarkLocals(this, trc, nfixed, numValueSlots());
- // Clear dead block-scoped locals.
- while (nfixed > nlivefixed)
- unaliasedLocal(--nfixed).setUndefined();
+ // Clear dead block-scoped locals.
+ while (nfixed > nlivefixed)
+ unaliasedLocal(--nfixed).setUndefined();
- // Mark live locals.
- MarkLocals(this, trc, 0, nlivefixed);
+ // Mark live locals.
+ MarkLocals(this, trc, 0, nlivefixed);
+ }
}
if (script->compartment()->debugEnvs)