Bug 29503

Summary: Implement ES5 Object.defineProperty function
Product: WebKit Reporter: Oliver Hunt <oliver@apple.com>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned@lists.webkit.org>
Status: RESOLVED FIXED    
Severity: Normal Keywords: InRadar
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Mac OS X 10.5   
Attachments:
Description Flags
Implement ES5 Object.defineProperty function ggaren: review+

Description From 2009-09-18 13:54:01 PST
as in title
------- Comment #1 From 2009-09-18 13:54:50 PST -------
rdar://7214220
------- Comment #2 From 2009-09-18 14:51:48 PST -------
Created an attachment (id=39791) [details]
Implement ES5 Object.defineProperty function

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

Reviewed by NOBODY(OOPS!)

Implement Object.defineProperty.  This requires adding the API to
ObjectConstructor, along with a helper function that implements the
ES5 internal [[ToPropertyDescriptor]] function.  It then adds
JSObject::defineOwnProperty that implements the appropriate ES5 semantics.
Currently defineOwnProperty uses a delete followed by a put to redefine
attributes of a property, clearly this is less efficient than it could be
but we can improve this if it needs to be possible in future.
---
 33 files changed, 921 insertions(+), 73 deletions(-)
------- Comment #3 From 2009-09-18 15:27:39 PST -------
(From update of attachment 39791 [details])
r=me
------- Comment #4 From 2009-09-18 16:12:22 PST -------
Committed r48542