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.
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.
*** This bug has been marked as a duplicate of bug 158068 ***