Bug 277899
| Summary: | Object.keys(global) includes non-enumerable properties unless delete'd first | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Meghan Denny <meghan> |
| Component: | JavaScriptCore | Assignee: | Keith Miller <keith_miller> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | ashvayka, karlcow, keith_miller, mark.lam, webkit-bug-importer, ysuzuki |
| Priority: | P2 | Keywords: | BrowserCompat, InRadar |
| Version: | Safari 17 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Meghan Denny
Discovered on Safari Version 17.5 (19618.2.12.11.6)
\> Object.keys(globalThis).includes("setInterval")
\< true
\> const d = Object.getOwnPropertyDescriptor(globalThis, "setInterval");
\> d.enumerable = false;
\> Object.defineProperty(globalThis, "setInterval", d);
\> Object.getOwnPropertyDescriptor(globalThis, "setInterval").enumerable
\< false
\> Object.keys(globalThis).includes("setInterval")
\< true
the final call should return false.
am unable to reproduce in Chrome Version 129.0.6647.0.
am unable to reproduce in Firefox 129.0.
am unable to reproduce with values that are not globalThis.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/134121649>
Keith Miller
Pull request: https://github.com/WebKit/WebKit/pull/32462
EWS
Committed 282554@main (eed6352f9b23): <https://commits.webkit.org/282554@main>
Reviewed commits have been landed. Closing PR #32462 and removing active labels.