Bug 216529

Summary: [JSC] Intl.Collator should take collation option
Product: WebKit Reporter: Yusuke Suzuki <ysuzuki>
Component: JavaScriptCoreAssignee: Yusuke Suzuki <ysuzuki>
Status: RESOLVED FIXED    
Severity: Normal CC: ews-watchlist, keith_miller, mark.lam, msaboff, ross.kirsling, saam, tzagallo, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 213425    
Attachments:
Description Flags
Patch ross.kirsling: review+

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>