mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-10 01:59:31 +00:00
LibJS+LibWeb: Use Object::set_prototype() in more places
This commit is contained in:
parent
84c9f3e0d0
commit
ba6e4c7ae1
Notes:
sideshowbarker
2024-07-18 03:12:50 +09:00
Author: https://github.com/linusg
Commit: ba6e4c7ae1
Pull-request: https://github.com/SerenityOS/serenity/pull/10310
Reviewed-by: https://github.com/IdanHo ✅
5 changed files with 5 additions and 10 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue