Bug 648438 - Don't assert about js_ReconstructStackDepth for imacros since apparently this only works for imacros in the top stack frame (r=jwalden)

--HG--
extra : rebase_source : a7059021f02113b41214080e4ec6a4fe5210c4a5
This commit is contained in:
Luke Wagner 2011-06-16 08:14:19 -07:00
parent a9e2ffa879
commit 02e7f00e45
2 changed files with 10 additions and 1 deletions

View File

@ -0,0 +1,7 @@
for (var i = 0; i < 20; i++) {
(function () {
try {
JSON.parse();
} catch (e) {}
}).call();
}

View File

@ -938,7 +938,8 @@ StackIter::settleOnNewState()
if (op == JSOP_CALL || op == JSOP_FUNCALL) {
uintN argc = GET_ARGC(pc_);
DebugOnly<uintN> spoff = sp_ - fp_->base();
JS_ASSERT(spoff == js_ReconstructStackDepth(cx_, fp_->script(), pc_));
JS_ASSERT_IF(!fp_->hasImacropc(),
spoff == js_ReconstructStackDepth(cx_, fp_->script(), pc_));
Value *vp = sp_ - (2 + argc);
if (IsNativeFunction(*vp)) {
@ -947,6 +948,7 @@ StackIter::settleOnNewState()
return;
}
} else if (op == JSOP_FUNAPPLY) {
JS_ASSERT(!fp_->hasImacropc());
uintN argc = GET_ARGC(pc_);
uintN spoff = js_ReconstructStackDepth(cx_, fp_->script(), pc_);
Value *sp = fp_->base() + spoff;