1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 06:37:35 +00:00

LibJS: Convert internal_set() to ThrowCompletionOr

This commit is contained in:
Linus Groh 2021-09-29 18:31:37 +01:00
parent 6c2b974db2
commit e5409c6ead
19 changed files with 66 additions and 69 deletions

View file

@ -121,7 +121,7 @@ JS::ThrowCompletionOr<JS::Value> SheetGlobalObject::internal_get(const JS::Prope
return Base::internal_get(property_name, receiver);
}
bool SheetGlobalObject::internal_set(const JS::PropertyName& property_name, JS::Value value, JS::Value receiver)
JS::ThrowCompletionOr<bool> SheetGlobalObject::internal_set(const JS::PropertyName& property_name, JS::Value value, JS::Value receiver)
{
if (property_name.is_string()) {
if (auto pos = m_sheet.parse_cell_name(property_name.as_string()); pos.has_value()) {

View file

@ -28,7 +28,7 @@ public:
virtual ~SheetGlobalObject() override;
virtual JS::ThrowCompletionOr<JS::Value> internal_get(JS::PropertyName const&, JS::Value receiver) const override;
virtual bool internal_set(JS::PropertyName const&, JS::Value value, JS::Value receiver) override;
virtual JS::ThrowCompletionOr<bool> internal_set(JS::PropertyName const&, JS::Value value, JS::Value receiver) override;
virtual void initialize_global_object() override;
JS_DECLARE_NATIVE_FUNCTION(get_real_cell_contents);