Title: [201383] trunk/Source/_javascript_Core
Revision
201383
Author
carlo...@webkit.org
Date
2016-05-25 08:23:36 -0700 (Wed, 25 May 2016)

Log Message

REGRESSION(r201066): [GTK] Several intl tests started to fail in GTK+ bot after r201066
https://bugs.webkit.org/show_bug.cgi?id=158066

Reviewed by Darin Adler.

run-_javascript_core-tests does $ENV{LANG}="en_US.UTF-8"; but we are not actually honoring the environment
variables at all when using jsc binary. We are using setlocale() with a nullptr locale to get the current one, but
the current one is always "C", because to set the locale according to the environment variables we need to call
setlocale with an empty string as locale. That's done by gtk_init(), which is called by all our binaries (web
process, network process, etc.), but not by jsc (because jsc doesn't depend on GTK+). The reason why it has
always worked for EFL is because they call ecore_init() in jsc that calls setlocale.

* jsc.cpp:
(main): Call setlocale(LC_ALL, "") on GTK+.

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (201382 => 201383)


--- trunk/Source/_javascript_Core/ChangeLog	2016-05-25 14:44:48 UTC (rev 201382)
+++ trunk/Source/_javascript_Core/ChangeLog	2016-05-25 15:23:36 UTC (rev 201383)
@@ -1,3 +1,20 @@
+2016-05-25  Carlos Garcia Campos  <cgar...@igalia.com>
+
+        REGRESSION(r201066): [GTK] Several intl tests started to fail in GTK+ bot after r201066
+        https://bugs.webkit.org/show_bug.cgi?id=158066
+
+        Reviewed by Darin Adler.
+
+        run-_javascript_core-tests does $ENV{LANG}="en_US.UTF-8"; but we are not actually honoring the environment
+        variables at all when using jsc binary. We are using setlocale() with a nullptr locale to get the current one, but
+        the current one is always "C", because to set the locale according to the environment variables we need to call
+        setlocale with an empty string as locale. That's done by gtk_init(), which is called by all our binaries (web
+        process, network process, etc.), but not by jsc (because jsc doesn't depend on GTK+). The reason why it has
+        always worked for EFL is because they call ecore_init() in jsc that calls setlocale.
+
+        * jsc.cpp:
+        (main): Call setlocale(LC_ALL, "") on GTK+.
+
 2016-05-25  Csaba Osztrogonác  <o...@webkit.org>
 
         [ARM] Fix the Wcast-align warning in LinkBuffer.cpp

Modified: trunk/Source/_javascript_Core/jsc.cpp (201382 => 201383)


--- trunk/Source/_javascript_Core/jsc.cpp	2016-05-25 14:44:48 UTC (rev 201382)
+++ trunk/Source/_javascript_Core/jsc.cpp	2016-05-25 15:23:36 UTC (rev 201383)
@@ -1931,6 +1931,11 @@
     ecore_init();
 #endif
 
+#if PLATFORM(GTK)
+    if (!setlocale(LC_ALL, ""))
+        WTFLogAlways("Locale not supported by C library.\n\tUsing the fallback 'C' locale.");
+#endif
+
     // Need to initialize WTF threading before we start any threads. Cannot initialize JSC
     // threading yet, since that would do somethings that we'd like to defer until after we
     // have a chance to parse options.
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to