<?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>173737</bug_id>
          
          <creation_ts>2017-06-22 15:09:33 -0700</creation_ts>
          <short_desc>CodeGeneratorJS.pm generates an invalid Prototype::finishCreation when there are both runtime-enabled and settings-enabled properties</short_desc>
          <delta_ts>2017-08-08 20:26:03 -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 Local Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ali Juma">ajuma</reporter>
          <assigned_to name="Sam Weinig">sam</assigned_to>
          <cc>cdumez</cc>
    
    <cc>dino</cc>
    
    <cc>sam</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1322075</commentid>
    <comment_count>0</comment_count>
    <who name="Ali Juma">ajuma</who>
    <bug_when>2017-06-22 15:09:33 -0700</bug_when>
    <thetext>When there are only settings-enabled properties, the ::finishCreation method gets signature:
void ${className}Prototype::finishCreation(VM&amp; vm)

but when there are also settings-enabled properties, the method gets signature:
void ${className}Prototype::finishCreation(VM&amp; vm, JSDOMGlobalObject&amp; globalObject)

The code that&apos;s generated for runtime-enabled properties includes the line:
JSObject::deleteProperty(this, globalObject()-&gt;globalExec(), propertyName);

which is calling globabObject(). The problem is that when the generated method signature includes globalObject as an argument, that hides the globalObject function, so the globalObject() call is now trying to call operator() on JSDOMGlobalObject, and compilation fails.

Either the generated code needs to use a different name for the argument, or that argument should always be included when we have runtime-enabled properties and then we should use that rather than making the call to globalObject() (assuming that&apos;s getting at the same object).

This code was added to CodeGeneratorJS.pm in http://trac.webkit.org/changeset/216198.

I ran into this problem trying to compile JSDocument.cpp after adding a settings-enabled function to DocumentOrShadowRoot.idl.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1322076</commentid>
    <comment_count>1</comment_count>
    <who name="Ali Juma">ajuma</who>
    <bug_when>2017-06-22 15:11:21 -0700</bug_when>
    <thetext>(In reply to Ali Juma from comment #0)
&gt; When there are only settings-enabled properties, the ::finishCreation method
&gt; gets signature:
&gt; void ${className}Prototype::finishCreation(VM&amp; vm)

Sorry, that should say &quot;When there are only *runtime*-enabled properties&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1336835</commentid>
    <comment_count>2</comment_count>
    <who name="Sam Weinig">sam</who>
    <bug_when>2017-08-08 20:25:28 -0700</bug_when>
    <thetext>This was fixed recently.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1336836</commentid>
    <comment_count>3</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2017-08-08 20:26:03 -0700</bug_when>
    <thetext>&lt;rdar://problem/33791848&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>