Bug 1118911 - GetPcScript should care about bailout frames. r=jandem

This commit is contained in:
Nicolas B. Pierron 2015-01-15 16:28:15 +01:00
parent a6068b03ba
commit 6c4bcd4d3a
2 changed files with 12 additions and 2 deletions

View File

@ -0,0 +1,9 @@
function test() {
function f()
k.apply(this, arguments);
if (undefined >> undefined !== 0) {}
for (var [ v , c ] = 0 in this.tracemonkey) { }
}
try { test(); } catch(exc1) {}
try { test(); } catch(exc1) {}

View File

@ -1495,10 +1495,11 @@ GetPcScript(JSContext *cx, JSScript **scriptRes, jsbytecode **pcRes)
return;
// Lookup failed: undertake expensive process to recover the innermost inlined frame.
++it; // Skip exit frame.
if (!it.isBailoutJS())
++it; // Skip exit frame.
jsbytecode *pc = nullptr;
if (it.isIonJS()) {
if (it.isIonJS() || it.isBailoutJS()) {
InlineFrameIterator ifi(cx, &it);
*scriptRes = ifi.script();
pc = ifi.pc();