Bug 230652

Summary: [JSC] emoji and eor collations are missing
Product: WebKit Reporter: Yusuke Suzuki <ysuzuki>
Component: New BugsAssignee: Yusuke Suzuki <ysuzuki>
Status: RESOLVED FIXED    
Severity: Normal CC: darin, ews-watchlist, keith_miller, mark.lam, msaboff, ross.kirsling, sbarati, tzagallo, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch ross.kirsling: review+

Description Yusuke Suzuki 2021-09-22 16:23:21 PDT
[JSC] emoji and eor collations are missing
Comment 1 Yusuke Suzuki 2021-09-22 16:24:33 PDT
Created attachment 438989 [details]
Patch
Comment 2 Ross Kirsling 2021-09-22 17:25:13 PDT
Comment on attachment 438989 [details]
Patch

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

r=me with a question

> Source/JavaScriptCore/runtime/IntlObject.cpp:1661
> +    // ICU ~69 has a bug that does not report "emoji" and "eor" for collation when using ucol_getKeywordValues.

There's no concern for older ICU versions here, is there?
Comment 3 Yusuke Suzuki 2021-09-22 17:28:15 PDT
Comment on attachment 438989 [details]
Patch

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

>> Source/JavaScriptCore/runtime/IntlObject.cpp:1661
>> +    // ICU ~69 has a bug that does not report "emoji" and "eor" for collation when using ucol_getKeywordValues.
> 
> There's no concern for older ICU versions here, is there?

Even though it is not supported, it is still OK to have that in available collations, since it just means that we have this collation, but no locale supports that.
Comment 4 Yusuke Suzuki 2021-09-22 17:39:31 PDT
Committed r282897 (242025@main): <https://commits.webkit.org/242025@main>
Comment 5 Radar WebKit Bug Importer 2021-09-22 17:40:28 PDT
<rdar://problem/83425179>
Comment 6 Darin Adler 2021-10-01 16:43:57 PDT
Comment on attachment 438989 [details]
Patch

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

> Source/JavaScriptCore/runtime/IntlObject.cpp:1688
> +    elements.resize(elements.size() - (elements.end() - end));

Not important, but for slightly more efficient code this can use shrink instead of resize.