RESOLVED FIXED 173737
CodeGeneratorJS.pm generates an invalid Prototype::finishCreation when there are both runtime-enabled and settings-enabled properties
https://bugs.webkit.org/show_bug.cgi?id=173737
Summary CodeGeneratorJS.pm generates an invalid Prototype::finishCreation when there ...
Ali Juma
Reported 2017-06-22 15:09:33 PDT
When there are only settings-enabled properties, the ::finishCreation method gets signature: void ${className}Prototype::finishCreation(VM& vm) but when there are also settings-enabled properties, the method gets signature: void ${className}Prototype::finishCreation(VM& vm, JSDOMGlobalObject& globalObject) The code that's generated for runtime-enabled properties includes the line: JSObject::deleteProperty(this, globalObject()->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'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.
Attachments
Ali Juma
Comment 1 2017-06-22 15:11:21 PDT
(In reply to Ali Juma from comment #0) > When there are only settings-enabled properties, the ::finishCreation method > gets signature: > void ${className}Prototype::finishCreation(VM& vm) Sorry, that should say "When there are only *runtime*-enabled properties"
Sam Weinig
Comment 2 2017-08-08 20:25:28 PDT
This was fixed recently.
Radar WebKit Bug Importer
Comment 3 2017-08-08 20:26:03 PDT
Note You need to log in before you can comment on or make changes to this bug.