<?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>150446</bug_id>
          
          <creation_ts>2015-10-22 08:14:33 -0700</creation_ts>
          <short_desc>Clean binding generated code for custom attribute setters and getters</short_desc>
          <delta_ts>2016-06-21 08:03:13 -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>WebCore JavaScript</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>158068</dup_id>
          
          <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="youenn fablet">youennf</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ossy</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1135687</commentid>
    <comment_count>0</comment_count>
    <who name="youenn fablet">youennf</who>
    <bug_when>2015-10-22 08:14:33 -0700</bug_when>
    <thetext>As pointed out by Ossy in bug 150438, the binding generator code for custom attribute getters and/or setters should be fixed:

&gt; &gt; Source/WebCore/bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:158
&gt; &gt; +EncodedJSValue jsTestJSBuiltinConstructorTestAttributeCustom(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
&gt; &gt; +{
&gt; &gt; +    UNUSED_PARAM(state);
&gt; &gt; +    UNUSED_PARAM(slotBase);
&gt; &gt; +    UNUSED_PARAM(thisValue);
&gt; &gt; +    auto* castedThis = jsCast&lt;JSTestJSBuiltinConstructor*&gt;(slotBase);
&gt; &gt; +    return JSValue::encode(castedThis-&gt;testAttributeCustom(*state));
&gt; &gt; +}
&gt; 
&gt; state and slotBase parameters are used. thisValue is really unused, 
&gt; but in this case omitting the parameter name would be better.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1135691</commentid>
    <comment_count>1</comment_count>
    <who name="youenn fablet">youennf</who>
    <bug_when>2015-10-22 08:25:25 -0700</bug_when>
    <thetext>After a quick look at the  binding generator code for attribute getters/setters, it contains many &quot;if&quot; statements.
It is not always easy to identify whether each variable is used or not, depending on the different generation options.
Hence the current code I guess.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1204143</commentid>
    <comment_count>2</comment_count>
    <who name="youenn fablet">youennf</who>
    <bug_when>2016-06-21 08:03:13 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 158068 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>