Bug 1122581 - Fix FormatFrame to not assert on Ion frames in some cases. r=shu

This commit is contained in:
Jan de Mooij 2016-02-08 15:13:37 +01:00
parent 1cd5cc8dd9
commit 20da2fbc56
2 changed files with 16 additions and 6 deletions

View File

@ -0,0 +1,10 @@
function f(x, y) {
for (var i=0; i<50; i++) {
if (i % 10 === 0) {
var stack = getBacktrace({args: true, locals: true, thisprops: true});
assertEq(stack.includes("f(x = "), true);
foo = arguments;
}
}
}
f(1, 2);

View File

@ -759,13 +759,13 @@ FormatFrame(JSContext* cx, const ScriptFrameIter& iter, char* buf, int num,
break;
}
}
} else if (script->argsObjAliasesFormals() && iter.hasArgsObj()) {
arg = iter.argsObj().arg(i);
} else {
if (iter.hasUsableAbstractFramePtr())
arg = iter.unaliasedActual(i, DONT_CHECK_ALIASING);
} else if (iter.hasUsableAbstractFramePtr()) {
if (script->argsObjAliasesFormals() && iter.hasArgsObj())
arg = iter.argsObj().arg(i);
else
arg = MagicValue(JS_OPTIMIZED_OUT);
arg = iter.unaliasedActual(i, DONT_CHECK_ALIASING);
} else {
arg = MagicValue(JS_OPTIMIZED_OUT);
}
JSAutoByteString valueBytes;