mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 07:07:44 +00:00
LibJS: Convert internal_get_own_property() to ThrowCompletionOr
This commit is contained in:
parent
73bae7d779
commit
0e69a6e487
19 changed files with 100 additions and 166 deletions
|
@ -57,9 +57,9 @@ JS::ThrowCompletionOr<bool> ConsoleGlobalObject::internal_prevent_extensions()
|
|||
return m_window_object->internal_prevent_extensions();
|
||||
}
|
||||
|
||||
Optional<JS::PropertyDescriptor> ConsoleGlobalObject::internal_get_own_property(JS::PropertyName const& property_name) const
|
||||
JS::ThrowCompletionOr<Optional<JS::PropertyDescriptor>> ConsoleGlobalObject::internal_get_own_property(JS::PropertyName const& property_name) const
|
||||
{
|
||||
if (auto result = m_window_object->internal_get_own_property(property_name); result.has_value())
|
||||
if (auto result = TRY(m_window_object->internal_get_own_property(property_name)); result.has_value())
|
||||
return result;
|
||||
|
||||
return Base::internal_get_own_property(property_name);
|
||||
|
|
|
@ -27,7 +27,7 @@ public:
|
|||
virtual JS::ThrowCompletionOr<bool> internal_set_prototype_of(Object* prototype) override;
|
||||
virtual JS::ThrowCompletionOr<bool> internal_is_extensible() const override;
|
||||
virtual JS::ThrowCompletionOr<bool> internal_prevent_extensions() override;
|
||||
virtual Optional<JS::PropertyDescriptor> internal_get_own_property(JS::PropertyName const& name) const override;
|
||||
virtual JS::ThrowCompletionOr<Optional<JS::PropertyDescriptor>> internal_get_own_property(JS::PropertyName const& name) const override;
|
||||
virtual bool internal_define_own_property(JS::PropertyName const& name, JS::PropertyDescriptor const& descriptor) override;
|
||||
virtual bool internal_has_property(JS::PropertyName const& name) const override;
|
||||
virtual JS::Value internal_get(JS::PropertyName const&, JS::Value) const override;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue