Ignore:
Timestamp:
Oct 5, 2015, 4:36:56 PM (10 years ago)
Author:
Sukolsak Sakshuwong
Message:

[Intl] Change the return type of canonicalizeLocaleList() from JSArray* to Vector<String>
https://bugs.webkit.org/show_bug.cgi?id=149807

Reviewed by Benjamin Poulain.

From ECMA-402, 9.2.1, the abstract operation CanonicalizeLocaleList
returns a List of Strings. From the spec, we never modify the result
from CanonicalizeLocaleList(). We never expose it to the user either.
This patch changes the return type of canonicalizeLocaleList() from
JSArray* to Vector<String>. This should ease the workload of the GC and
make the code a bit easier to read.

  • runtime/IntlCollatorConstructor.cpp:

(JSC::IntlCollatorConstructorFuncSupportedLocalesOf):

  • runtime/IntlDateTimeFormatConstructor.cpp:

(JSC::IntlDateTimeFormatConstructorFuncSupportedLocalesOf):

  • runtime/IntlNumberFormatConstructor.cpp:

(JSC::IntlNumberFormatConstructorFuncSupportedLocalesOf):

  • runtime/IntlObject.cpp:

(JSC::canonicalizeLocaleList):
(JSC::lookupSupportedLocales):
(JSC::bestFitSupportedLocales):
(JSC::supportedLocales):

  • runtime/IntlObject.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r190589 r190591  
     12015-10-05  Sukolsak Sakshuwong  <[email protected]>
     2
     3        [Intl] Change the return type of canonicalizeLocaleList() from JSArray* to Vector<String>
     4        https://bugs.webkit.org/show_bug.cgi?id=149807
     5
     6        Reviewed by Benjamin Poulain.
     7
     8        From ECMA-402, 9.2.1, the abstract operation CanonicalizeLocaleList
     9        returns a List of Strings. From the spec, we never modify the result
     10        from CanonicalizeLocaleList(). We never expose it to the user either.
     11        This patch changes the return type of canonicalizeLocaleList() from
     12        JSArray* to Vector<String>. This should ease the workload of the GC and
     13        make the code a bit easier to read.
     14
     15        * runtime/IntlCollatorConstructor.cpp:
     16        (JSC::IntlCollatorConstructorFuncSupportedLocalesOf):
     17        * runtime/IntlDateTimeFormatConstructor.cpp:
     18        (JSC::IntlDateTimeFormatConstructorFuncSupportedLocalesOf):
     19        * runtime/IntlNumberFormatConstructor.cpp:
     20        (JSC::IntlNumberFormatConstructorFuncSupportedLocalesOf):
     21        * runtime/IntlObject.cpp:
     22        (JSC::canonicalizeLocaleList):
     23        (JSC::lookupSupportedLocales):
     24        (JSC::bestFitSupportedLocales):
     25        (JSC::supportedLocales):
     26        * runtime/IntlObject.h:
     27
    1282015-10-01  Geoffrey Garen  <[email protected]>
    229
Note: See TracChangeset for help on using the changeset viewer.