Summary: | Stop using String::deprecatedCharacters to call WTF::Collator | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Darin Adler <darin> | ||||||||||||
Component: | Web Template Framework | Assignee: | Darin Adler <darin> | ||||||||||||
Status: | RESOLVED FIXED | ||||||||||||||
Severity: | Normal | CC: | andersca, ap, benjamin, cmarcelo, commit-queue, enrica | ||||||||||||
Priority: | P2 | ||||||||||||||
Version: | 528+ (Nightly build) | ||||||||||||||
Hardware: | All | ||||||||||||||
OS: | All | ||||||||||||||
Attachments: |
|
Description
Darin Adler
2014-02-09 22:33:51 PST
Created attachment 223676 [details]
Patch
Created attachment 223677 [details]
Patch
Created attachment 223679 [details]
Patch
Created attachment 223713 [details]
Patch
Comment on attachment 223713 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=223713&action=review r=me This patch doesn't apply any more, so it would be useful to let EWS work on an updated version. > Source/WTF/wtf/unicode/icu/CollatorICU.cpp:71 > +static inline char* copyASCIIString(CFStringRef string) Maybe a name like copyShortASCIIString or copyLocaleNameToASCIIString would make it more obvious why the implementation is not general purpose. > Source/WTF/wtf/unicode/icu/CollatorICU.cpp:95 > + static char* defaultLocale = copyDefaultLocale(); I like to ASSERT(isMainThread()) everywhere a static variables are used like this. Or maybe this could be made thread safe. Comment on attachment 223713 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=223713&action=review >> Source/WTF/wtf/unicode/icu/CollatorICU.cpp:71 >> +static inline char* copyASCIIString(CFStringRef string) > > Maybe a name like copyShortASCIIString or copyLocaleNameToASCIIString would make it more obvious why the implementation is not general purpose. Great idea. Done. >> Source/WTF/wtf/unicode/icu/CollatorICU.cpp:95 >> + static char* defaultLocale = copyDefaultLocale(); > > I like to ASSERT(isMainThread()) everywhere a static variables are used like this. > > Or maybe this could be made thread safe. Great suggestion. I used std::call_once to make this thread safe. Created attachment 223719 [details]
Patch
Attachment 223719 [details] did not pass style-queue:
ERROR: Source/WTF/wtf/unicode/icu/CollatorICU.cpp:98: Missing space before { [whitespace/braces] [5]
Total errors found: 1 in 8 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Committed r163792: <http://trac.webkit.org/changeset/163792> This causes a crash on iOS. I'll post a patch to fix it. Patch attached to https://bugs.webkit.org/show_bug.cgi?id=128548 |