mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 14:22:01 +00:00
Fixed bug #316293; when break was very first statement in a loop it wasn't
getting patched and so looped for ever.
This commit is contained in:
parent
19a2523b04
commit
46f5ffb26f
@ -290,7 +290,7 @@ PatchGotos(JSContext *cx, JSCodeGenerator *cg, JSStmtInfo *stmt,
|
||||
|
||||
pc = CG_CODE(cg, last);
|
||||
top = CG_CODE(cg, stmt->top);
|
||||
while (pc > top) {
|
||||
while (pc != CG_CODE(cg, -1)) {
|
||||
PR_ASSERT(*pc == JSOP_GOTO);
|
||||
delta = GET_JUMP_OFFSET(pc);
|
||||
jumpOffset = PTRDIFF(target, pc, jsbytecode);
|
||||
|
@ -62,7 +62,7 @@ struct JSStmtInfo {
|
||||
};
|
||||
|
||||
#define SET_STATEMENT_TOP(stmt, top) \
|
||||
((stmt)->top = (stmt)->update = (stmt)->breaks = (stmt)->continues = (top))
|
||||
((stmt)->top = (stmt)->update = (top), (stmt)->breaks = (stmt)->continues = (-1))
|
||||
|
||||
struct JSTreeContext { /* tree context for semantic checks */
|
||||
uint32 flags; /* statement state flags, see below */
|
||||
|
Loading…
Reference in New Issue
Block a user