RESOLVED DUPLICATE of bug 158068 150446
Clean binding generated code for custom attribute setters and getters
https://bugs.webkit.org/show_bug.cgi?id=150446
Summary Clean binding generated code for custom attribute setters and getters
youenn fablet
Reported 2015-10-22 08:14:33 PDT
As pointed out by Ossy in bug 150438, the binding generator code for custom attribute getters and/or setters should be fixed: > > Source/WebCore/bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:158 > > +EncodedJSValue jsTestJSBuiltinConstructorTestAttributeCustom(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName) > > +{ > > + UNUSED_PARAM(state); > > + UNUSED_PARAM(slotBase); > > + UNUSED_PARAM(thisValue); > > + auto* castedThis = jsCast<JSTestJSBuiltinConstructor*>(slotBase); > > + return JSValue::encode(castedThis->testAttributeCustom(*state)); > > +} > > state and slotBase parameters are used. thisValue is really unused, > but in this case omitting the parameter name would be better.
Attachments
youenn fablet
Comment 1 2015-10-22 08:25:25 PDT
After a quick look at the binding generator code for attribute getters/setters, it contains many "if" 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.
youenn fablet
Comment 2 2016-06-21 08:03:13 PDT
*** This bug has been marked as a duplicate of bug 158068 ***
Note You need to log in before you can comment on or make changes to this bug.