[Webkit-unassigned] [Bug 286996] New: `Object.getOwnPropertyDescriptors` on a function yields keys in reverse order after second call

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Feb 3 22:15:07 PST 2025


https://bugs.webkit.org/show_bug.cgi?id=286996

            Bug ID: 286996
           Summary: `Object.getOwnPropertyDescriptors` on a function
                    yields keys in reverse order after second call
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: New Bugs
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: meghan at bun.sh

```js
function abc() {}
console.log(Object.keys(Object.getOwnPropertyDescriptors(abc))); // [ "length", "name", "prototype" ]
console.log(Object.keys(Object.getOwnPropertyDescriptors(abc))); // [ "prototype", "length", "name" ]
console.log(Object.keys(Object.getOwnPropertyDescriptors(abc))); // [ "prototype", "length", "name" ]

function def() {}
console.log(Object.keys(Object.getOwnPropertyDescriptors(def))); // [ "length", "name", "prototype" ]
console.log(Object.keys(Object.getOwnPropertyDescriptors(def))); // [ "prototype", "length", "name" ]
console.log(Object.keys(Object.getOwnPropertyDescriptors(def))); // [ "prototype", "length", "name" ]
```

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20250204/24aaa58f/attachment.htm>


More information about the webkit-unassigned mailing list