Changeset 172152 in webkit
- Timestamp:
- Aug 6, 2014 10:27:41 AM (10 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r172149 r172152 1 2014-08-06 Dániel Bátyai <dbatyai.u-szeged@partner.samsung.com> 2 3 [ARM] Incorrect handling of Unicode characters 4 https://bugs.webkit.org/show_bug.cgi?id=135380 5 6 Reviewed by Darin Adler. 7 8 Removed erroneous fast case from stringFromUTF(), since it assumed that 9 char is always implemented as signed. 10 11 * jsc.cpp: 12 (stringFromUTF): 13 1 14 2014-08-06 Dániel Bátyai <dbatyai.u-szeged@partner.samsung.com> 2 15 -
trunk/Source/JavaScriptCore/jsc.cpp
r172129 r172152 662 662 static inline String stringFromUTF(const char* utf8) 663 663 { 664 // Find the the first non-ascii character, or nul. 665 const char* pos = utf8; 666 while (*pos > 0) 667 pos++; 668 size_t asciiLength = pos - utf8; 669 670 // Fast case - string is all ascii. 671 if (!*pos) 672 return String(utf8, asciiLength); 673 674 // Slow case - contains non-ascii characters, use fromUTF8WithLatin1Fallback. 675 ASSERT(*pos < 0); 676 ASSERT(strlen(utf8) == asciiLength + strlen(pos)); 677 return String::fromUTF8WithLatin1Fallback(utf8, asciiLength + strlen(pos)); 664 return String::fromUTF8WithLatin1Fallback(utf8, strlen(utf8)); 678 665 } 679 666
Note: See TracChangeset
for help on using the changeset viewer.