Bug 173737
Summary: | CodeGeneratorJS.pm generates an invalid Prototype::finishCreation when there are both runtime-enabled and settings-enabled properties | ||
---|---|---|---|
Product: | WebKit | Reporter: | Ali Juma <ajuma> |
Component: | Bindings | Assignee: | Sam Weinig <sam> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | cdumez, dino, sam, webkit-bug-importer |
Priority: | P2 | Keywords: | InRadar |
Version: | WebKit Local Build | ||
Hardware: | Unspecified | ||
OS: | All |
Ali Juma
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 | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Ali Juma
(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
This was fixed recently.
Radar WebKit Bug Importer
<rdar://problem/33791848>