Bug 1143194 - Handle JSTRY_FOR_OF when bailing out in-place from Ion for debug mode. (r=jandem)

This commit is contained in:
Shu-yu Guo 2015-03-21 14:11:14 -07:00
parent ad0d736971
commit 3bca61f7a5

View File

@ -483,8 +483,16 @@ HasLiveIteratorAtStackDepth(JSScript *script, jsbytecode *pc, uint32_t stackDept
if (pcOffset >= tn->start + tn->length)
continue;
// For-in loops have only the iterator on stack.
if (tn->kind == JSTRY_ITER && stackDepth == tn->stackDepth)
return true;
// For-of loops have both the iterator and the result on stack.
if (tn->kind == JSTRY_FOR_OF &&
(stackDepth == tn->stackDepth || stackDepth == tn->stackDepth - 1))
{
return true;
}
}
return false;