mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 474236 - Only throw errors when we have to. r=brendan
This commit is contained in:
parent
25c8ed99e7
commit
5f7e26cdd5
@ -1446,10 +1446,15 @@ Statements(JSContext *cx, JSTokenStream *ts, JSTreeContext *tc)
|
||||
ts->flags |= TSF_OPERAND;
|
||||
tt = js_PeekToken(cx, ts);
|
||||
ts->flags &= ~TSF_OPERAND;
|
||||
if (tt == TOK_RC)
|
||||
if (tt <= TOK_EOF || tt == TOK_RC) {
|
||||
if (tt == TOK_ERROR) {
|
||||
if (ts->flags & TSF_EOF)
|
||||
ts->flags |= TSF_UNEXPECTED_EOF;
|
||||
return NULL;
|
||||
}
|
||||
break;
|
||||
}
|
||||
pn2 = Statement(cx, ts, tc);
|
||||
JS_ASSERT_IF(tt == TOK_ERROR, !pn2);
|
||||
if (!pn2) {
|
||||
if (ts->flags & TSF_EOF)
|
||||
ts->flags |= TSF_UNEXPECTED_EOF;
|
||||
|
Loading…
Reference in New Issue
Block a user