[webkit-reviews] review granted: [Bug 31597] locale for text breakiterator and string search is not set to the UI locale : [Attachment 46314] updated patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jan 11 17:11:59 PST 2010


Darin Adler <darin at apple.com> has granted Jungshik Shin <jshin at chromium.org>'s
request for review:
Bug 31597: locale for text breakiterator and string search is not set to the UI
locale
https://bugs.webkit.org/show_bug.cgi?id=31597

Attachment 46314: updated patch
https://bugs.webkit.org/attachment.cgi?id=46314&action=review

------- Additional Comments from Darin Adler <darin at apple.com>
> +static const char* UILanguage()
> +{
> +    // Chrome's UI language can be different from the OS UI language on
Windows.
> +    // We want to return Chrome's UI language here.
> +    static WebCore::CString locale = WebCore::defaultLanguage().latin1();
> +    return locale.data();
> +}

Normally I would put a function like this inside the WebCore namespace rather
than outside. Any reason it's outside? You could avoid those two WebCore
prefixes that way.

Most places in WebCore we try to avoid global destructors that run on process
exit. In fact, for code in the Mac OS X version, it's required. The idiom is to
use the DEFINE_STATIC_LOCAL macro.


More information about the webkit-reviews mailing list