diff --git a/Meta/Lagom/Tools/CodeGenerators/LibWeb/WrapperGenerator.cpp b/Meta/Lagom/Tools/CodeGenerators/LibWeb/WrapperGenerator.cpp index 13b0976ba3..69b96cec31 100644 --- a/Meta/Lagom/Tools/CodeGenerators/LibWeb/WrapperGenerator.cpp +++ b/Meta/Lagom/Tools/CodeGenerators/LibWeb/WrapperGenerator.cpp @@ -1568,8 +1568,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(global_object).ensure_web_prototype<@prototype_class@>("@name@")).release_value(); - VERIFY(success); + set_prototype(&static_cast(global_object).ensure_web_prototype<@prototype_class@>("@name@")); } )~~~"); } diff --git a/Userland/Libraries/LibJS/Runtime/ECMAScriptFunctionObject.cpp b/Userland/Libraries/LibJS/Runtime/ECMAScriptFunctionObject.cpp index 94bd59e967..88b0d80c11 100644 --- a/Userland/Libraries/LibJS/Runtime/ECMAScriptFunctionObject.cpp +++ b/Userland/Libraries/LibJS/Runtime/ECMAScriptFunctionObject.cpp @@ -82,7 +82,7 @@ void ECMAScriptFunctionObject::initialize(GlobalObject& global_object) break; case FunctionKind::Generator: // prototype is "g1.prototype" in figure-2 (https://tc39.es/ecma262/img/figure-2.png) - (void)prototype->internal_set_prototype_of(global_object.generator_object_prototype()); + set_prototype(global_object.generator_object_prototype()); break; } define_direct_property(vm.names.prototype, prototype, Attribute::Writable); diff --git a/Userland/Libraries/LibJS/Runtime/GlobalObject.cpp b/Userland/Libraries/LibJS/Runtime/GlobalObject.cpp index c2cc6ae825..5f42447e4f 100644 --- a/Userland/Libraries/LibJS/Runtime/GlobalObject.cpp +++ b/Userland/Libraries/LibJS/Runtime/GlobalObject.cpp @@ -142,8 +142,7 @@ void GlobalObject::initialize_global_object() static_cast(m_object_prototype)->initialize(*this); - auto success = Object::internal_set_prototype_of(m_object_prototype).release_value(); - VERIFY(success); + Object::set_prototype(m_object_prototype); // This must be initialized before allocating AggregateErrorPrototype, which uses ErrorPrototype as its prototype. m_error_prototype = heap().allocate(*this, *this); diff --git a/Userland/Libraries/LibJS/Runtime/Object.cpp b/Userland/Libraries/LibJS/Runtime/Object.cpp index d8b34558f5..fc8e677580 100644 --- a/Userland/Libraries/LibJS/Runtime/Object.cpp +++ b/Userland/Libraries/LibJS/Runtime/Object.cpp @@ -48,9 +48,7 @@ Object::Object(ConstructWithoutPrototypeTag, GlobalObject& global_object) Object::Object(Object& prototype) { m_shape = prototype.global_object().empty_object_shape(); - // FIXME: Factor out step 9 into a simple prototype setter and use that - auto success = internal_set_prototype_of(&prototype).release_value(); - VERIFY(success); + set_prototype(&prototype); } Object::Object(Shape& shape) diff --git a/Userland/Libraries/LibWeb/Bindings/WindowObject.cpp b/Userland/Libraries/LibWeb/Bindings/WindowObject.cpp index 4492a47c41..b5264d8352 100644 --- a/Userland/Libraries/LibWeb/Bindings/WindowObject.cpp +++ b/Userland/Libraries/LibWeb/Bindings/WindowObject.cpp @@ -54,8 +54,7 @@ void WindowObject::initialize_global_object() { Base::initialize_global_object(); - auto success = Object::internal_set_prototype_of(&ensure_web_prototype("EventTarget")).release_value(); - VERIFY(success); + Object::set_prototype(&ensure_web_prototype("EventTarget")); // FIXME: These should be native accessors, not properties define_direct_property("window", this, JS::Attribute::Enumerable);