зеркало из https://github.com/mozilla/gecko-dev.git
Bug 352044 - Issues with Unicode escape sequences in JavaScript source code; Unicode escapes not part of identifiers were being treated as their equivalent CVs, and non-identifier Unicode escapes within identifiers were being treated as their CVs (simultaneously starting a new token). acid3++ r=mrbkap, a=damons
This commit is contained in:
Родитель
464088c511
Коммит
57b29cd9c0
|
@ -1211,16 +1211,19 @@ retry:
|
|||
hadUnicodeEscape = JS_FALSE;
|
||||
if (JS_ISIDSTART(c) ||
|
||||
(c == '\\' &&
|
||||
(c = GetUnicodeEscape(ts),
|
||||
hadUnicodeEscape = JS_ISIDSTART(c)))) {
|
||||
(qc = GetUnicodeEscape(ts),
|
||||
hadUnicodeEscape = JS_ISIDSTART(qc)))) {
|
||||
if (hadUnicodeEscape)
|
||||
c = qc;
|
||||
INIT_TOKENBUF();
|
||||
for (;;) {
|
||||
ADD_TO_TOKENBUF(c);
|
||||
c = GetChar(ts);
|
||||
if (c == '\\') {
|
||||
c = GetUnicodeEscape(ts);
|
||||
if (!JS_ISIDENT(c))
|
||||
qc = GetUnicodeEscape(ts);
|
||||
if (!JS_ISIDENT(qc))
|
||||
break;
|
||||
c = qc;
|
||||
hadUnicodeEscape = JS_TRUE;
|
||||
} else {
|
||||
if (!JS_ISIDENT(c))
|
||||
|
|
Загрузка…
Ссылка в новой задаче