Changeset 99436 in webkit for trunk/Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp
- Timestamp:
- Nov 7, 2011, 9:54:15 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp
r97905 r99436 86 86 int charLen = 0; 87 87 if (k <= len - 3 && isASCIIHexDigit(p[1]) && isASCIIHexDigit(p[2])) { 88 const char b0 = Lexer ::convertHex(p[1], p[2]);88 const char b0 = Lexer<UChar>::convertHex(p[1], p[2]); 89 89 const int sequenceLen = UTF8SequenceLength(b0); 90 90 if (sequenceLen != 0 && k <= len - sequenceLen * 3) { … … 95 95 const UChar* q = p + i * 3; 96 96 if (q[0] == '%' && isASCIIHexDigit(q[1]) && isASCIIHexDigit(q[2])) 97 sequence[i] = Lexer ::convertHex(q[1], q[2]);97 sequence[i] = Lexer<UChar>::convertHex(q[1], q[2]); 98 98 else { 99 99 charLen = 0; … … 124 124 && isASCIIHexDigit(p[4]) && isASCIIHexDigit(p[5])) { 125 125 charLen = 6; 126 u = Lexer ::convertUnicode(p[2], p[3], p[4], p[5]);126 u = Lexer<UChar>::convertUnicode(p[2], p[3], p[4], p[5]); 127 127 } 128 128 } … … 174 174 } 175 175 176 double parseIntOverflow(const char* s, int length, int radix)176 double parseIntOverflow(const LChar* s, int length, int radix) 177 177 { 178 178 double number = 0.0; 179 179 double radixMultiplier = 1.0; 180 180 181 for (const char* p = s + length - 1; p >= s; p--) {181 for (const LChar* p = s + length - 1; p >= s; p--) { 182 182 if (radixMultiplier == std::numeric_limits<double>::infinity()) { 183 183 if (*p != '0') { … … 579 579 if (c[0] == '%' && k <= len - 6 && c[1] == 'u') { 580 580 if (isASCIIHexDigit(c[2]) && isASCIIHexDigit(c[3]) && isASCIIHexDigit(c[4]) && isASCIIHexDigit(c[5])) { 581 u = Lexer ::convertUnicode(c[2], c[3], c[4], c[5]);581 u = Lexer<UChar>::convertUnicode(c[2], c[3], c[4], c[5]); 582 582 c = &u; 583 583 k += 5; 584 584 } 585 585 } else if (c[0] == '%' && k <= len - 3 && isASCIIHexDigit(c[1]) && isASCIIHexDigit(c[2])) { 586 u = UChar(Lexer ::convertHex(c[1], c[2]));586 u = UChar(Lexer<UChar>::convertHex(c[1], c[2])); 587 587 c = &u; 588 588 k += 2;
Note:
See TracChangeset
for help on using the changeset viewer.