mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 11:49:44 +00:00
LibJS: Convert internal_own_property_keys() to ThrowCompletionOr
This commit is contained in:
parent
fbfb0bb908
commit
ee8380edea
Notes:
sideshowbarker
2024-07-18 03:18:58 +09:00
Author: https://github.com/linusg
Commit: ee8380edea
Pull-request: https://github.com/SerenityOS/serenity/pull/10266
Reviewed-by: https://github.com/IdanHo ✅
15 changed files with 56 additions and 92 deletions
|
@ -1420,7 +1420,7 @@ public:
|
|||
virtual JS::ThrowCompletionOr<bool> internal_define_own_property(JS::PropertyName const&, JS::PropertyDescriptor const&) override;
|
||||
virtual JS::ThrowCompletionOr<bool> internal_delete(JS::PropertyName const&) override;
|
||||
virtual JS::ThrowCompletionOr<bool> internal_prevent_extensions() override;
|
||||
virtual JS::MarkedValueList internal_own_property_keys() const override;
|
||||
virtual JS::ThrowCompletionOr<JS::MarkedValueList> internal_own_property_keys() const override;
|
||||
)~~~");
|
||||
}
|
||||
|
||||
|
@ -2301,7 +2301,7 @@ JS::ThrowCompletionOr<bool> @class_name@::internal_prevent_extensions()
|
|||
|
||||
// 3.9.6. [[OwnPropertyKeys]], https://heycam.github.io/webidl/#legacy-platform-object-ownpropertykeys
|
||||
scoped_generator.append(R"~~~(
|
||||
JS::MarkedValueList @class_name@::internal_own_property_keys() const
|
||||
JS::ThrowCompletionOr<JS::MarkedValueList> @class_name@::internal_own_property_keys() const
|
||||
{
|
||||
auto& vm = this->vm();
|
||||
|
||||
|
@ -2348,7 +2348,7 @@ JS::MarkedValueList @class_name@::internal_own_property_keys() const
|
|||
// FIXME: 6. Assert: keys has no duplicate items.
|
||||
|
||||
// 7. Return keys.
|
||||
return keys;
|
||||
return { move(keys) };
|
||||
}
|
||||
)~~~");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue