<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>189466</bug_id>
          
          <creation_ts>2018-09-09 19:37:43 -0700</creation_ts>
          <short_desc>Add bindings support for representing attributes with JSValueInWrappedObject</short_desc>
          <delta_ts>2018-09-10 03:01:33 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Bindings</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=189458</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Andy Estes">aestes</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>cdumez</cc>
    
    <cc>ysuzuki</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1458063</commentid>
    <comment_count>0</comment_count>
    <who name="Andy Estes">aestes</who>
    <bug_when>2018-09-09 19:37:43 -0700</bug_when>
    <thetext>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).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1458065</commentid>
    <comment_count>1</comment_count>
    <who name="Andy Estes">aestes</who>
    <bug_when>2018-09-09 19:41:24 -0700</bug_when>
    <thetext>(In reply to Andy Estes from comment #0)
&gt; In CustomEvent, History, MessageEvent, PaymentMethodChangeEvent, and
&gt; PaymentResponse, we have custom bindings support for representing attributes
&gt; of type object or any.
&gt; 
&gt; These custom bindings tend to do two things:
&gt; 
&gt; 1. Add a custom getter for an attribute of type object or any that converts
&gt; the native value to a JSValue, cache that JSValue in a
&gt; JSValueInWrappedObject in the wrapper class, then return the cached JSValue.
&gt; 2. Add a custom mark function that visits the cached JSValueInWrappedObject
&gt; as well as any other JSValueInWrappedObjects in the wrapper class.
&gt; 
&gt; We should teach the bindings generator to do this for us for attributes of
&gt; object or any type (perhaps with a custom annotation).

s/wrapper class/wrapped class</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>