WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WORKSFORME
54289
Object.defineProperty does not override existing properties
https://bugs.webkit.org/show_bug.cgi?id=54289
Summary
Object.defineProperty does not override existing properties
Jürg Lehni
Reported
2011-02-11 09:27:40 PST
Even if configurable: true was provided at definition time: var obj = {}; Object.defineProperty(obj, 'test', { value: 10, configurable: true }); alert(obj.test); // 10 Object.defineProperty(obj, 'test', { value: 20, configurable: true }); alert(obj.test); // Should be 20, is still 10 The workaround is to call delete before the 2nd definition: delete obj.test; But it seems this contradicts the specifications. Or am I misinterpreting them?
Attachments
Code to replicate behavior.
(377 bytes, text/html)
2011-02-11 09:28 PST
,
Jürg Lehni
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Jürg Lehni
Comment 1
2011-02-11 09:28:29 PST
Created
attachment 82140
[details]
Code to replicate behavior.
Jürg Lehni
Comment 2
2011-02-14 02:22:15 PST
Here the link to the same bug over at the Chromium site:
http://code.google.com/p/chromium/issues/detail?id=72736
Gavin Barraclough
Comment 3
2012-03-12 16:00:28 PDT
This works in ToT, a lot of defineOwnProperty bugs were fixed lately so it'll be hard to track down exactly which revision! Please reopen if you are still seeing any issues. cheers, G.
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