WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED DUPLICATE of
bug 232723
232724
Array.prototype.toLocaleString does not stringify undefined/null localization results
https://bugs.webkit.org/show_bug.cgi?id=232724
Summary
Array.prototype.toLocaleString does not stringify undefined/null localization...
Richard Gibson
Reported
2021-11-04 13:24:51 PDT
The algorithm at
https://tc39.es/ecma402/#sup-array.prototype.tolocalestring
requires looking up a "toLocaleString" property on each non-undefined non-null element of the receiver array, invoking it as a method, and (absent an exception) passing the result through ToString. However, JSC appears to bypass ToString for undefined or null output from the toLocaleString method. The following expression should evaluate to "undefined", but instead evaluates to "": [{toLocaleString(){}}].toLocaleString() The following expression should evaluate to "null", but instead evaluates to "": [{toLocaleString(){return null}}].toLocaleString() Also reported to test262 for coverage:
https://github.com/tc39/test262/issues/3298
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2021-11-11 12:25:22 PST
<
rdar://problem/85310544
>
Yusuke Suzuki
Comment 2
2022-01-03 07:19:01 PST
Will do it in
bug 232723
:D *** This bug has been marked as a duplicate of
bug 232723
***
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug