Ignore:
Timestamp:
May 25, 2016, 8:23:36 AM (9 years ago)
Author:
Carlos Garcia Campos
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-javascriptcore-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+.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/jsc.cpp

    r201322 r201383  
    19321932#endif
    19331933
     1934#if PLATFORM(GTK)
     1935    if (!setlocale(LC_ALL, ""))
     1936        WTFLogAlways("Locale not supported by C library.\n\tUsing the fallback 'C' locale.");
     1937#endif
     1938
    19341939    // Need to initialize WTF threading before we start any threads. Cannot initialize JSC
    19351940    // threading yet, since that would do somethings that we'd like to defer until after we
Note: See TracChangeset for help on using the changeset viewer.