summaryrefslogtreecommitdiff
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
commit9acd98298ccadd83495fa1615573ebcca6648bae (patch)
tree629b86b40cb9145711bd9d72536dfb4d75723d06
parentce71c0fe3f7db1fa1f054d689b7237f36d6d8266 (diff)
downloaduxp-9acd98298ccadd83495fa1615573ebcca6648bae.tar.gz
[js] Fix invalid early return in BaselineFrame::trace.
We were not tracing debugger environments for Baseline frames without any local/expression slots.
-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 b8c61300fc..3f00e9b36a 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)