[webkit-reviews] review granted: [Bug 233983] Move computeUserPrefersSimplified to Language.cpp and add locking around it : [Attachment 446309] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Dec 8 21:30:59 PST 2021
Myles C. Maxfield <mmaxfield at apple.com> has granted Cameron McCormack (:heycam)
<heycam at apple.com>'s request for review:
Bug 233983: Move computeUserPrefersSimplified to Language.cpp and add locking
around it
https://bugs.webkit.org/show_bug.cgi?id=233983
Attachment 446309: Patch
https://bugs.webkit.org/attachment.cgi?id=446309&action=review
--- Comment #2 from Myles C. Maxfield <mmaxfield at apple.com> ---
Comment on attachment 446309
--> https://bugs.webkit.org/attachment.cgi?id=446309
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=446309&action=review
> Source/WTF/wtf/Language.cpp:137
> + Vector<String>& override = preferredLanguagesOverride();
|override| is per-thread? It's surprising to see it move from inside the
critical section to outside.
> Source/WTF/wtf/Language.cpp:149
> - return isolatedCopy(languages);
> + return languages;
How confident are you that this is safe?
> Source/WTF/wtf/Language.cpp:164
> + if (equalIgnoringASCIICase(language, "zh-tw"))
> + return false;
> + if (equalIgnoringASCIICase(language, "zh-cn"))
> + return true;
Wow I can't believe I wrote this. https://www.rfc-editor.org/rfc/rfc4647
More information about the webkit-reviews
mailing list