1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:08:12 +00:00

LibJS: Convert internal_set_prototype_of() to ThrowCompletionOr

This commit is contained in:
Linus Groh 2021-09-28 23:54:42 +01:00
parent 5148150e1c
commit 8c81c84c18
20 changed files with 43 additions and 50 deletions

View file

@ -1553,7 +1553,7 @@ namespace Web::Bindings {
@wrapper_class@::@wrapper_class@(JS::GlobalObject& global_object, @fully_qualified_name@& impl)
: @wrapper_base_class@(global_object, impl)
{
auto success = internal_set_prototype_of(&static_cast<WindowObject&>(global_object).ensure_web_prototype<@prototype_class@>("@name@"));
auto success = internal_set_prototype_of(&static_cast<WindowObject&>(global_object).ensure_web_prototype<@prototype_class@>("@name@")).release_value();
VERIFY(success);
}
)~~~");
@ -2808,12 +2808,12 @@ namespace Web::Bindings {
// https://heycam.github.io/webidl/#es-DOMException-specialness
// Object.getPrototypeOf(DOMException.prototype) === Error.prototype
generator.append(R"~~~(
auto success = internal_set_prototype_of(global_object.error_prototype());
auto success = internal_set_prototype_of(global_object.error_prototype()).release_value();
VERIFY(success);
)~~~");
} else if (!interface.parent_name.is_empty()) {
generator.append(R"~~~(
auto success = internal_set_prototype_of(&static_cast<WindowObject&>(global_object).ensure_web_prototype<@prototype_base_class@>("@parent_name@"));
auto success = internal_set_prototype_of(&static_cast<WindowObject&>(global_object).ensure_web_prototype<@prototype_base_class@>("@parent_name@")).release_value();
VERIFY(success);
)~~~");
}