mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:47:34 +00:00
LibJS: Convert internal_set_prototype_of() to ThrowCompletionOr
This commit is contained in:
parent
5148150e1c
commit
8c81c84c18
20 changed files with 43 additions and 50 deletions
|
@ -8,6 +8,7 @@
|
|||
#include <AK/Base64.h>
|
||||
#include <AK/String.h>
|
||||
#include <AK/Utf8View.h>
|
||||
#include <LibJS/Runtime/Completion.h>
|
||||
#include <LibJS/Runtime/Error.h>
|
||||
#include <LibJS/Runtime/FunctionObject.h>
|
||||
#include <LibJS/Runtime/Shape.h>
|
||||
|
@ -52,7 +53,7 @@ void WindowObject::initialize_global_object()
|
|||
{
|
||||
Base::initialize_global_object();
|
||||
|
||||
auto success = Object::internal_set_prototype_of(&ensure_web_prototype<EventTargetPrototype>("EventTarget"));
|
||||
auto success = Object::internal_set_prototype_of(&ensure_web_prototype<EventTargetPrototype>("EventTarget")).release_value();
|
||||
VERIFY(success);
|
||||
|
||||
// FIXME: These should be native accessors, not properties
|
||||
|
@ -143,7 +144,7 @@ Origin WindowObject::origin() const
|
|||
}
|
||||
|
||||
// https://heycam.github.io/webidl/#platform-object-setprototypeof
|
||||
bool WindowObject::internal_set_prototype_of(JS::Object* prototype)
|
||||
JS::ThrowCompletionOr<bool> WindowObject::internal_set_prototype_of(JS::Object* prototype)
|
||||
{
|
||||
// 1. Return ? SetImmutablePrototype(O, V).
|
||||
return set_immutable_prototype(prototype);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue