[Webkit-unassigned] [Bug 54289] New: Object.defineProperty does not override existing properties
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Feb 11 09:27:40 PST 2011
https://bugs.webkit.org/show_bug.cgi?id=54289
Summary: Object.defineProperty does not override existing
properties
Product: WebKit
Version: 528+ (Nightly build)
Platform: Macintosh Intel
OS/Version: Mac OS X 10.6
Status: UNCONFIRMED
Severity: Normal
Priority: P2
Component: JavaScriptCore
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: lists at scratchdisk.com
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?
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list