mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 492150 - Unexpected error occurred when japascript.options.strict is true (r=mrbkap).
This commit is contained in:
parent
d7dc2e67bf
commit
c244179e84
@ -3049,18 +3049,18 @@ BindVarOrConst(JSContext *cx, BindData *data, JSAtom *atom, JSTreeContext *tc)
|
||||
return JS_FALSE;
|
||||
}
|
||||
} else {
|
||||
if (JS_HAS_STRICT_OPTION(cx)
|
||||
? op != JSOP_DEFVAR || dn_kind != JSDefinition::VAR
|
||||
: op == JSOP_DEFCONST ||
|
||||
bool error = (op == JSOP_DEFCONST ||
|
||||
dn_kind == JSDefinition::CONST ||
|
||||
(dn_kind == JSDefinition::LET &&
|
||||
(stmt->type != STMT_CATCH || OuterLet(tc, stmt, atom)))) {
|
||||
(stmt->type != STMT_CATCH || OuterLet(tc, stmt, atom))));
|
||||
|
||||
if (JS_HAS_STRICT_OPTION(cx)
|
||||
? op != JSOP_DEFVAR || dn_kind != JSDefinition::VAR
|
||||
: error) {
|
||||
name = js_AtomToPrintableString(cx, atom);
|
||||
if (!name ||
|
||||
!js_ReportCompileErrorNumber(cx, TS(tc->compiler), pn,
|
||||
(op != JSOP_DEFCONST &&
|
||||
dn_kind != JSDefinition::CONST &&
|
||||
dn_kind != JSDefinition::LET)
|
||||
!error
|
||||
? JSREPORT_WARNING | JSREPORT_STRICT
|
||||
: JSREPORT_ERROR,
|
||||
JSMSG_REDECLARED_VAR,
|
||||
|
Loading…
Reference in New Issue
Block a user