зеркало из https://github.com/mozilla/gecko-dev.git
Bug 785094: Fix negative colspans showing up in the wrong places. r=jorendorff
This commit is contained in:
Родитель
8a2e15d8be
Коммит
bbefca0372
|
@ -4804,6 +4804,7 @@ EmitNormalFor(JSContext *cx, BytecodeEmitter *bce, ParseNode *pn, ptrdiff_t top)
|
|||
if (NewSrcNote2(cx, bce, SRC_SETLINE, lineno) < 0)
|
||||
return false;
|
||||
bce->current->currentLine = (unsigned) lineno;
|
||||
bce->current->lastColumn = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5262,6 +5263,7 @@ EmitStatement(JSContext *cx, BytecodeEmitter *bce, ParseNode *pn)
|
|||
} else if (!pn->isDirectivePrologueMember()) {
|
||||
/* Don't complain about directive prologue members; just don't emit their code. */
|
||||
bce->current->currentLine = pn2->pn_pos.begin.lineno;
|
||||
bce->current->lastColumn = 0;
|
||||
if (!bce->reportStrictWarning(pn2, JSMSG_USELESS_EXPR))
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
// |jit-test| dump-bytecode
|
||||
Function("for(let b; true; x) \nfalse");
|
Загрузка…
Ссылка в новой задаче