зеркало из https://github.com/mozilla/pjs.git
(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:
Родитель
54edc42020
Коммит
8d6efefdc6
|
@ -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;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче