Bug 262123

Summary: Getting function name that includes space return empty string
Product: WebKit Reporter: Jimmy Wärting <jimmy>
Component: JavaScriptCoreAssignee: Mark Lam <mark.lam>
Status: RESOLVED FIXED    
Severity: Normal CC: mark.lam, webkit-bug-importer, ysuzuki
Priority: P2 Keywords: InRadar
Version: Safari 16   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=157246

Jimmy Wärting
Reported 2023-09-26 09:55:22 PDT
Object.values(({ "foo bar"() { } }))[0].name expected result should be "foo bar"
Attachments
Radar WebKit Bug Importer
Comment 1 2023-10-03 09:56:17 PDT
Mark Lam
Comment 2 2023-10-03 20:18:27 PDT
Found the issue. This issue does not manifest in the jsc shell but does on webpages. The reason is due a site specific quirk (introduced back in 2016) to work around the mathjs framework (at https://github.com/josdejong/mathjs) not supporting ES6 function names that can contain white space. See https://bugs.webkit.org/show_bug.cgi?id=157246. Now that mathjs no longer has the offending code, plus both Chrome and Firefox has caught up to the ES6 spec on this, it's time to remove this quirk.
Mark Lam
Comment 3 2023-10-03 22:29:13 PDT
EWS
Comment 4 2023-10-04 02:05:36 PDT
Committed 268838@main (17d73b1570a4): <https://commits.webkit.org/268838@main> Reviewed commits have been landed. Closing PR #18612 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.