From 63ca149be546d9871f295b2bafae6812a0583c35 Mon Sep 17 00:00:00 2001 From: Simon Wanner Date: Mon, 20 Mar 2023 19:29:09 +0100 Subject: [PATCH] LibWeb: Make [PutForwards] work together with [ImplementedAs] --- .../CodeGenerators/LibWeb/BindingsGenerator/IDLGenerators.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Meta/Lagom/Tools/CodeGenerators/LibWeb/BindingsGenerator/IDLGenerators.cpp b/Meta/Lagom/Tools/CodeGenerators/LibWeb/BindingsGenerator/IDLGenerators.cpp index 06beba8b8c..012e78fda2 100644 --- a/Meta/Lagom/Tools/CodeGenerators/LibWeb/BindingsGenerator/IDLGenerators.cpp +++ b/Meta/Lagom/Tools/CodeGenerators/LibWeb/BindingsGenerator/IDLGenerators.cpp @@ -2571,7 +2571,6 @@ JS_DEFINE_NATIVE_FUNCTION(@class_name@::@attribute.setter_callback@) } )~~~"); } else if (auto put_forwards_identifier = attribute.extended_attributes.get("PutForwards"sv); put_forwards_identifier.has_value()) { - attribute_generator.set("attribute.name", attribute.name.to_snakecase()); attribute_generator.set("put_forwards_identifier"sv, *put_forwards_identifier); attribute_generator.append(R"~~~( @@ -2580,7 +2579,7 @@ JS_DEFINE_NATIVE_FUNCTION(@class_name@::@attribute.setter_callback@) auto* impl = TRY(impl_from(vm)); auto value = vm.argument(0); - auto receiver = TRY(throw_dom_exception_if_needed(vm, [&]() { return impl->@attribute.name@(); })); + auto receiver = TRY(throw_dom_exception_if_needed(vm, [&]() { return impl->@attribute.cpp_name@(); })); TRY(receiver->set(JS::PropertyKey { "@put_forwards_identifier@" }, value, JS::Object::ShouldThrowExceptions::Yes)); return JS::js_undefined();