Bug 216529 - [JSC] Intl.Collator should take collation option
Summary: [JSC] Intl.Collator should take collation option
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Yusuke Suzuki
URL:
Keywords: InRadar
Depends on:
Blocks: 213425
  Show dependency treegraph
 
Reported: 2020-09-14 22:55 PDT by Yusuke Suzuki
Modified: 2020-09-15 14:59 PDT (History)
8 users (show)

See Also:


Attachments
Patch (10.67 KB, patch)
2020-09-14 23:55 PDT, Yusuke Suzuki
ross.kirsling: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yusuke Suzuki 2020-09-14 22:55:18 PDT
https://github.com/tc39/ecma402/issues/380
We have consensus.
Comment 1 Yusuke Suzuki 2020-09-14 22:57:14 PDT
https://github.com/tc39/ecma402/pull/459
Comment 2 Yusuke Suzuki 2020-09-14 23:55:10 PDT
Created attachment 408797 [details]
Patch
Comment 3 Ross Kirsling 2020-09-15 11:21:39 PDT
Comment on attachment 408797 [details]
Patch

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

r=me

> Source/JavaScriptCore/runtime/IntlCollator.cpp:185
> +                throwRangeError(globalObject, scope, "collation must be unicode-locale-identifier's \"type\""_s);

Hmm, we shouldn't require the user to know Unicode spec productions. 😅
To match what we've done in other Intl classes, I would suggest "collation is not a well-formed collation value".
Comment 4 Yusuke Suzuki 2020-09-15 13:13:05 PDT
Comment on attachment 408797 [details]
Patch

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

Thanks!

>> Source/JavaScriptCore/runtime/IntlCollator.cpp:185
>> +                throwRangeError(globalObject, scope, "collation must be unicode-locale-identifier's \"type\""_s);
> 
> Hmm, we shouldn't require the user to know Unicode spec productions. 😅
> To match what we've done in other Intl classes, I would suggest "collation is not a well-formed collation value".

That's good! Changed.
Comment 5 Yusuke Suzuki 2020-09-15 14:58:37 PDT
Committed r267102: <https://trac.webkit.org/changeset/267102>
Comment 6 Radar WebKit Bug Importer 2020-09-15 14:59:16 PDT
<rdar://problem/68943945>