diff options
author | Linus Groh <mail@linusgroh.de> | 2021-09-29 18:20:10 +0100 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2021-09-29 23:49:53 +0100 |
commit | 6c2b974db28a0720a8788676f3a01f7cbc668afa (patch) | |
tree | 3e4389aeb1eb56124e37526b3580a7d8498381c2 /Userland/Services | |
parent | d9895ec12dbf51066fdc873920803121d7499844 (diff) | |
download | serenity-6c2b974db28a0720a8788676f3a01f7cbc668afa.zip |
LibJS: Convert internal_get() to ThrowCompletionOr
Diffstat (limited to 'Userland/Services')
-rw-r--r-- | Userland/Services/WebContent/ConsoleGlobalObject.cpp | 2 | ||||
-rw-r--r-- | Userland/Services/WebContent/ConsoleGlobalObject.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Services/WebContent/ConsoleGlobalObject.cpp b/Userland/Services/WebContent/ConsoleGlobalObject.cpp index 66f26b921d..d4d79c6468 100644 --- a/Userland/Services/WebContent/ConsoleGlobalObject.cpp +++ b/Userland/Services/WebContent/ConsoleGlobalObject.cpp @@ -75,7 +75,7 @@ JS::ThrowCompletionOr<bool> ConsoleGlobalObject::internal_has_property(JS::Prope return TRY(Object::internal_has_property(property_name)) || TRY(m_window_object->internal_has_property(property_name)); } -JS::Value ConsoleGlobalObject::internal_get(JS::PropertyName const& property_name, JS::Value receiver) const +JS::ThrowCompletionOr<JS::Value> ConsoleGlobalObject::internal_get(JS::PropertyName const& property_name, JS::Value receiver) const { if (m_window_object->has_own_property(property_name)) return m_window_object->internal_get(property_name, (receiver == this) ? m_window_object : receiver); diff --git a/Userland/Services/WebContent/ConsoleGlobalObject.h b/Userland/Services/WebContent/ConsoleGlobalObject.h index 1ff4832ff8..ca79a34579 100644 --- a/Userland/Services/WebContent/ConsoleGlobalObject.h +++ b/Userland/Services/WebContent/ConsoleGlobalObject.h @@ -30,7 +30,7 @@ public: virtual JS::ThrowCompletionOr<Optional<JS::PropertyDescriptor>> internal_get_own_property(JS::PropertyName const& name) const override; virtual JS::ThrowCompletionOr<bool> internal_define_own_property(JS::PropertyName const& name, JS::PropertyDescriptor const& descriptor) override; virtual JS::ThrowCompletionOr<bool> internal_has_property(JS::PropertyName const& name) const override; - virtual JS::Value internal_get(JS::PropertyName const&, JS::Value) const override; + virtual JS::ThrowCompletionOr<JS::Value> internal_get(JS::PropertyName const&, JS::Value) const override; virtual bool internal_set(JS::PropertyName const&, JS::Value value, JS::Value receiver) override; virtual bool internal_delete(JS::PropertyName const& name) override; virtual JS::MarkedValueList internal_own_property_keys() const override; |