mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 23:37:35 +00:00
LibJS: Convert internal_get_prototype_of() to ThrowCompletionOr
This commit is contained in:
parent
c8bf7f9c41
commit
5148150e1c
14 changed files with 48 additions and 70 deletions
|
@ -5,6 +5,7 @@
|
|||
*/
|
||||
|
||||
#include "ConsoleGlobalObject.h"
|
||||
#include <LibJS/Runtime/Completion.h>
|
||||
#include <LibWeb/Bindings/NodeWrapper.h>
|
||||
#include <LibWeb/Bindings/NodeWrapperFactory.h>
|
||||
#include <LibWeb/Bindings/WindowObject.h>
|
||||
|
@ -36,7 +37,7 @@ void ConsoleGlobalObject::visit_edges(Visitor& visitor)
|
|||
visitor.visit(m_window_object);
|
||||
}
|
||||
|
||||
JS::Object* ConsoleGlobalObject::internal_get_prototype_of() const
|
||||
JS::ThrowCompletionOr<JS::Object*> ConsoleGlobalObject::internal_get_prototype_of() const
|
||||
{
|
||||
return m_window_object->internal_get_prototype_of();
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <LibJS/Forward.h>
|
||||
#include <LibJS/Runtime/Completion.h>
|
||||
#include <LibJS/Runtime/GlobalObject.h>
|
||||
|
||||
namespace Web::Bindings {
|
||||
|
@ -22,7 +23,7 @@ public:
|
|||
ConsoleGlobalObject(Web::Bindings::WindowObject&);
|
||||
virtual ~ConsoleGlobalObject() override;
|
||||
|
||||
virtual Object* internal_get_prototype_of() const override;
|
||||
virtual JS::ThrowCompletionOr<Object*> internal_get_prototype_of() const override;
|
||||
virtual bool internal_set_prototype_of(Object* prototype) override;
|
||||
virtual bool internal_is_extensible() const override;
|
||||
virtual bool internal_prevent_extensions() override;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue