Bug 227855

Summary: [JSC] Workaround test262.report bug by making $ properties enumerable
Product: WebKit Reporter: Yusuke Suzuki <ysuzuki>
Component: New BugsAssignee: Yusuke Suzuki <ysuzuki>
Status: RESOLVED FIXED    
Severity: Normal CC: ashvayka, ews-watchlist, keith_miller, mark.lam, msaboff, saam, tzagallo, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Yusuke Suzuki 2021-07-10 15:05:15 PDT
[JSC] Workaround test262.report bug by making $ properties enumerable
Comment 1 Yusuke Suzuki 2021-07-10 15:07:03 PDT
Created attachment 433277 [details]
Patch
Comment 2 Alexey Shvayka 2021-07-10 15:28:37 PDT
Comment on attachment 433277 [details]
Patch

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

> Source/JavaScriptCore/ChangeLog:8
> +        test262.report's harness has a bug and it reports incorrect results for JSC on tests using $262 properties.

Is it a bug though? https://github.com/tc39/test262/blob/main/INTERPRETING.md#host-defined-functions requires $262 and print to be non-enumerable (which they are), yet it doesn't clarify attributes of $262 properties. "ordinary object with the following properties" kinda implies PropertyAttribute::None to me. Should we author a PR to clarify it?
Comment 3 Alexey Shvayka 2021-07-10 15:32:47 PDT
eshost has a workaround for non-enumerability that this patch fixes: https://github.com/bterlson/eshost/blob/76630bd6bf2d8401f92579f0d706273a495ce19e/runtimes/jsc.js#L6-L13. It would be nice to remove it as well.
Comment 4 EWS 2021-07-10 17:05:30 PDT
Committed r279810 (239573@main): <https://commits.webkit.org/239573@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 433277 [details].
Comment 5 Radar WebKit Bug Importer 2021-07-10 17:06:21 PDT
<rdar://problem/80424724>