LibWeb: Allow IDL attribute setters to throw DOMExceptions

This commit is contained in:
Idan Horowitz 2021-09-13 21:44:42 +03:00 committed by Andreas Kling
parent f9a169380c
commit 23997005cf
Notes: sideshowbarker 2024-07-18 03:59:50 +09:00

View file

@ -1727,7 +1727,7 @@ JS_DEFINE_NATIVE_FUNCTION(@prototype_class@::@attribute.setter_callback@)
}
} else {
attribute_generator.append(R"~~~(
impl->set_@attribute.name:snakecase@(cpp_value);
[[maybe_unused]] auto retval = throw_dom_exception_if_needed(vm, global_object, [&] { return impl->set_@attribute.name:snakecase@(cpp_value); });
)~~~");
}