WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED DUPLICATE of
bug 38970
Bug 221176
An issue about redefining attributes
https://bugs.webkit.org/show_bug.cgi?id=221176
Summary
An issue about redefining attributes
NWU_NISL
Reported
2021-01-30 04:57:08 PST
#version: d940b47 #Testcase var proto = {}; Object.defineProperty(proto, 'prop', { enumerable: true, }); var Con = function() {}; Con.prototype = proto; var obj = new Con(); Object.defineProperty(obj, 'prop', { enumerable: false, }); var arr = Object.keys(obj); for (var p in obj) { print(1) } #Command: ./webkit/WebKitBuild/Release/bin/jsc testcase.js #Output: 1 #Expected output: # Description When executing this test case, the prop property of obj was redefined, and other engines (SpiderMonkey, v8, chakra, etc.) set it as the redefined property, but the property of JavascriptCore is still the property on the prototype. So I suspect this is an implementation error of JavascriptCore.
Attachments
Add attachment
proposed patch, testcase, etc.
Alexey Shvayka
Comment 1
2021-01-30 09:23:00 PST
(In reply to NWU_NISL from
comment #0
)
> # Description > When executing this test case, the prop property of obj was redefined, and > other engines (SpiderMonkey, v8, chakra, etc.) set it as the redefined > property, but the property of JavascriptCore is still the property on the > prototype. So I suspect this is an implementation error of JavascriptCore.
Thank you for the test case! It was a long-standing issue, but as of
r270874
, JSC doesn't enumerate "prop" either. *** This bug has been marked as a duplicate of
bug 38970
***
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug