mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 00:01:50 +00:00
Fix EmitJump to AddSpanDep if in all necessary cases (155081, the small crash-fix patch).
This commit is contained in:
parent
f307e91cbd
commit
8e521d1654
@ -1135,16 +1135,16 @@ OptimizeSpanDeps(JSContext *cx, JSCodeGenerator *cg)
|
||||
static JSBool
|
||||
EmitJump(JSContext *cx, JSCodeGenerator *cg, JSOp op, ptrdiff_t off)
|
||||
{
|
||||
JSBool extend;
|
||||
ptrdiff_t jmp;
|
||||
jsbytecode *pc;
|
||||
|
||||
if (off < JUMP_OFFSET_MIN || JUMP_OFFSET_MAX < off) {
|
||||
if (!cg->spanDeps && !BuildSpanDepTable(cx, cg))
|
||||
return JS_FALSE;
|
||||
}
|
||||
extend = off < JUMP_OFFSET_MIN || JUMP_OFFSET_MAX < off;
|
||||
if (extend && !cg->spanDeps && !BuildSpanDepTable(cx, cg))
|
||||
return JS_FALSE;
|
||||
|
||||
jmp = js_Emit3(cx, cg, op, JUMP_OFFSET_HI(off), JUMP_OFFSET_LO(off));
|
||||
if (jmp >= 0 && cg->spanDeps) {
|
||||
if (jmp >= 0 && (extend || cg->spanDeps)) {
|
||||
pc = CG_CODE(cg, jmp);
|
||||
if (!AddSpanDep(cx, cg, pc, pc, off))
|
||||
return JS_FALSE;
|
||||
|
Loading…
Reference in New Issue
Block a user