Bug 120096 - REGRESSION (r145458?): WebProcess doesn't respect UI process localization
Summary: REGRESSION (r145458?): WebProcess doesn't respect UI process localization
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alexey Proskuryakov
URL:
Keywords: InRadar, Regression
Depends on:
Blocks:
 
Reported: 2013-08-20 16:00 PDT by Alexey Proskuryakov
Modified: 2013-08-21 10:24 PDT (History)
5 users (show)

See Also:


Attachments
proposed fix (5.22 KB, patch)
2013-08-20 16:12 PDT, Alexey Proskuryakov
darin: review+
buildbot: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from webkit-ews-12 for mac-mountainlion-wk2 (486.30 KB, application/zip)
2013-08-21 05:11 PDT, Build Bot
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Proskuryakov 2013-08-20 16:00:08 PDT
Running UI process with -AppleLanguages argument no longer results in a matching localization in WebProcess.

Also, WebKitTestRunner fails to set WebProcess localization to English.

<rdar://problem/14787771>
Comment 1 Alexey Proskuryakov 2013-08-20 16:12:54 PDT
Created attachment 209236 [details]
proposed fix
Comment 2 Build Bot 2013-08-21 05:11:26 PDT
Comment on attachment 209236 [details]
proposed fix

Attachment 209236 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.appspot.com/results/1513866

New failing tests:
fast/workers/termination-with-port-messages.html
Comment 3 Build Bot 2013-08-21 05:11:28 PDT
Created attachment 209263 [details]
Archive of layout-test-results from webkit-ews-12 for mac-mountainlion-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: webkit-ews-12  Port: mac-mountainlion-wk2  Platform: Mac OS X 10.8.4
Comment 4 Darin Adler 2013-08-21 09:52:29 PDT
Comment on attachment 209236 [details]
proposed fix

View in context: https://bugs.webkit.org/attachment.cgi?id=209236&action=review

> Source/WebKit2/UIProcess/Launcher/mac/ProcessLauncherMac.mm:425
> +    RetainPtr<CFStringRef> cfLocalization = adoptCF(WKCopyCFLocalizationPreferredName(0));
> +    CString localization = String(cfLocalization.get()).utf8();
> +    CString appleLanguagesArgument = String::format("('%s')", localization.data()).utf8();

I don’t think we need all three local variables. Maybe get rid of cfLocalization? Why use String::format when concatenation has much better performance? I would write this single-line version:

    CString appleLangagesArgument = ("('" + String(adoptCF(WKCopyCFLocalizationPreferredName(0))) + "')").utf8();
Comment 5 Alexey Proskuryakov 2013-08-21 10:24:47 PDT
Committed <http://trac.webkit.org/r154396>.