Bug 41937
Summary: | JavaScriptCore C API should provide a way to query property attributes | ||
---|---|---|---|
Product: | WebKit | Reporter: | Kent Hansen <kent.hansen> |
Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> |
Status: | NEW | ||
Severity: | Normal | CC: | barraclough, cmarcelo |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | PC | ||
OS: | All |
Kent Hansen
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.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Kent Hansen
This relates to https://bugs.webkit.org/show_bug.cgi?id=41769
Gavin Barraclough
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.