mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-21 02:35:21 +00:00
(update to fix for bug #31255). Previous patch was insufficient in that it
didn't handle the case when the tokenstream is not tokenizing newlines.
This commit is contained in:
parent
d526441bfe
commit
cf1bd923c5
@ -726,8 +726,11 @@ js_GetToken(JSContext *cx, JSTokenStream *ts)
|
||||
retry:
|
||||
do {
|
||||
c = GetChar(ts);
|
||||
if (c == '\n' && (ts->flags & TSF_NEWLINES))
|
||||
break;
|
||||
if (c == '\n') {
|
||||
ts->flags &= ~TSF_DIRTYLINE;
|
||||
if (ts->flags & TSF_NEWLINES)
|
||||
break;
|
||||
}
|
||||
} while (JS_ISSPACE(c));
|
||||
|
||||
ts->cursor = (ts->cursor + 1) & NTOKENS_MASK;
|
||||
@ -957,7 +960,6 @@ retry:
|
||||
|
||||
switch (c) {
|
||||
case '\n':
|
||||
ts->flags &= ~TSF_DIRTYLINE;
|
||||
c = TOK_EOL;
|
||||
break;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user