Bug 189466
Summary: | Add bindings support for representing attributes with JSValueInWrappedObject | ||
---|---|---|---|
Product: | WebKit | Reporter: | Andy Estes <aestes> |
Component: | Bindings | Assignee: | Nobody <webkit-unassigned> |
Status: | NEW | ||
Severity: | Normal | CC: | cdumez, ysuzuki |
Priority: | P2 | ||
Version: | WebKit Nightly Build | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=189458 |
Andy Estes
In CustomEvent, History, MessageEvent, PaymentMethodChangeEvent, and PaymentResponse, we have custom bindings support for representing attributes of type object or any.
These custom bindings tend to do two things:
1. Add a custom getter for an attribute of type object or any that converts the native value to a JSValue, cache that JSValue in a JSValueInWrappedObject in the wrapper class, then return the cached JSValue.
2. Add a custom mark function that visits the cached JSValueInWrappedObject as well as any other JSValueInWrappedObjects in the wrapper class.
We should teach the bindings generator to do this for us for attributes of object or any type (perhaps with a custom annotation).
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Andy Estes
(In reply to Andy Estes from comment #0)
> In CustomEvent, History, MessageEvent, PaymentMethodChangeEvent, and
> PaymentResponse, we have custom bindings support for representing attributes
> of type object or any.
>
> These custom bindings tend to do two things:
>
> 1. Add a custom getter for an attribute of type object or any that converts
> the native value to a JSValue, cache that JSValue in a
> JSValueInWrappedObject in the wrapper class, then return the cached JSValue.
> 2. Add a custom mark function that visits the cached JSValueInWrappedObject
> as well as any other JSValueInWrappedObjects in the wrapper class.
>
> We should teach the bindings generator to do this for us for attributes of
> object or any type (perhaps with a custom annotation).
s/wrapper class/wrapped class