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
git-svn-id: svn://10.0.0.236/trunk@247338 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
3e6532f714
commit
ab041effa3
@ -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))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user