Changeset 102182 in webkit for trunk/Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp
- Timestamp:
- Dec 6, 2011, 2:41:56 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp
r102146 r102182 647 647 if (str.is8Bit()) { 648 648 const LChar* characters = str.characters8(); 649 649 LChar convertedLChar; 650 650 while (k < len) { 651 651 const LChar* c = characters + k; … … 653 653 if (isASCIIHexDigit(c[2]) && isASCIIHexDigit(c[3]) && isASCIIHexDigit(c[4]) && isASCIIHexDigit(c[5])) { 654 654 builder.append(Lexer<UChar>::convertUnicode(c[2], c[3], c[4], c[5])); 655 k += 5; 655 k += 6; 656 continue; 656 657 } 657 658 } else if (c[0] == '%' && k <= len - 3 && isASCIIHexDigit(c[1]) && isASCIIHexDigit(c[2])) { 658 builder.append(Lexer<LChar>::convertHex(c[1], c[2])); 659 convertedLChar = LChar(Lexer<LChar>::convertHex(c[1], c[2])); 660 c = &convertedLChar; 659 661 k += 2; 660 } else661 662 } 663 builder.append(*c); 662 664 k++; 663 665 } … … 667 669 while (k < len) { 668 670 const UChar* c = characters + k; 669 UChar u;671 UChar convertedUChar; 670 672 if (c[0] == '%' && k <= len - 6 && c[1] == 'u') { 671 673 if (isASCIIHexDigit(c[2]) && isASCIIHexDigit(c[3]) && isASCIIHexDigit(c[4]) && isASCIIHexDigit(c[5])) { 672 u= Lexer<UChar>::convertUnicode(c[2], c[3], c[4], c[5]);673 c = & u;674 convertedUChar = Lexer<UChar>::convertUnicode(c[2], c[3], c[4], c[5]); 675 c = &convertedUChar; 674 676 k += 5; 675 677 } 676 678 } else if (c[0] == '%' && k <= len - 3 && isASCIIHexDigit(c[1]) && isASCIIHexDigit(c[2])) { 677 u= UChar(Lexer<UChar>::convertHex(c[1], c[2]));678 c = & u;679 convertedUChar = UChar(Lexer<UChar>::convertHex(c[1], c[2])); 680 c = &convertedUChar; 679 681 k += 2; 680 682 }
Note:
See TracChangeset
for help on using the changeset viewer.