RESOLVED FIXED295485
[JSC] Fix order of function's special properties returned by Object.keys` / `Object.entries`
https://bugs.webkit.org/show_bug.cgi?id=295485
Summary [JSC] Fix order of function's special properties returned by Object.keys` / `...
Sosuke Suzuki
Reported 2025-07-06 02:26:13 PDT
According to the specification, `OrdinaryOwnPropertyKeys` called by `Object.keys` or `Object.entries` on function objects should return properties in ascending chronological order[1]. This order should not be affected by `Object.defineProperty`. Therefore, when the `length` and `name` properties of function objects are enumerable, they should always come first. However, in the current JSC implementation, they come last. This patch fixes this behavior. Note that the `prototype` property doesn't need to be considered here as it is not configurable[2]. [1]: https://tc39.es/ecma262/#sec-ordinaryownpropertykeys [2]: https://tc39.es/ecma262/#sec-function-instances
Attachments
Sosuke Suzuki
Comment 1 2025-07-06 02:27:17 PDT
EWS
Comment 2 2025-07-11 04:36:45 PDT
Committed 297260@main (1f495933fd51): <https://commits.webkit.org/297260@main> Reviewed commits have been landed. Closing PR #47626 and removing active labels.
Radar WebKit Bug Importer
Comment 3 2025-07-11 04:37:16 PDT
Note You need to log in before you can comment on or make changes to this bug.