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

LibJS+LibWeb: Use Object::set_prototype() in more places

This commit is contained in:
Linus Groh 2021-10-02 14:32:37 +01:00
parent 84c9f3e0d0
commit ba6e4c7ae1
5 changed files with 5 additions and 10 deletions

View file

@ -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)