Bug 41937 - JavaScriptCore C API should provide a way to query property attributes
Summary: JavaScriptCore C API should provide a way to query property attributes
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-09 00:53 PDT by Kent Hansen
Modified: 2012-03-13 13:09 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kent Hansen 2010-07-09 00:53:25 PDT
It's possible to pass attributes to JSObjectSetProperty(), but there's no way to query a property's attributes.

The work-around is to call the original value of Object.getOwnPropertyDescriptor and query the properties of the resulting object (e.g. enumerable:false --> kJSPropertyAttributeDontEnum), but that's not so nice.
Comment 1 Kent Hansen 2010-07-09 00:58:50 PDT
This relates to https://bugs.webkit.org/show_bug.cgi?id=41769
Comment 2 Gavin Barraclough 2012-03-13 13:09:02 PDT
The JSC API should probably offer a low-level API of reflection traps matching set of 9 traps in 8.12 - e.g. we should have something matching [[GetOwnProperty]], which would return a descriptor.  We may also want to consider any new reflection APIs being introduced in ES6 (e.g. direct proxies) in designing any API here.