mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-21 16:58:58 +00:00
LibJS: Convert initialize_binding() to ThrowCompletionOr
Also add spec step comments to it while we're here.
This commit is contained in:
parent
2691c65639
commit
ae397541fb
Notes:
sideshowbarker
2024-07-18 02:52:24 +09:00
Author: https://github.com/linusg
Commit: ae397541fb
Pull-request: https://github.com/SerenityOS/serenity/pull/10413
Reviewed-by: https://github.com/IdanHo ✅
12 changed files with 50 additions and 36 deletions
|
@ -36,7 +36,7 @@ public:
|
|||
virtual ThrowCompletionOr<bool> has_binding([[maybe_unused]] FlyString const& name, [[maybe_unused]] Optional<size_t>* out_index = nullptr) const { return false; }
|
||||
virtual ThrowCompletionOr<void> create_mutable_binding(GlobalObject&, [[maybe_unused]] FlyString const& name, [[maybe_unused]] bool can_be_deleted) { return {}; }
|
||||
virtual ThrowCompletionOr<void> create_immutable_binding(GlobalObject&, [[maybe_unused]] FlyString const& name, [[maybe_unused]] bool strict) { return {}; }
|
||||
virtual void initialize_binding(GlobalObject&, [[maybe_unused]] FlyString const& name, Value) { }
|
||||
virtual ThrowCompletionOr<void> initialize_binding(GlobalObject&, [[maybe_unused]] FlyString const& name, Value) { return {}; }
|
||||
virtual void set_mutable_binding(GlobalObject&, [[maybe_unused]] FlyString const& name, Value, [[maybe_unused]] bool strict) { }
|
||||
virtual Value get_binding_value(GlobalObject&, [[maybe_unused]] FlyString const& name, [[maybe_unused]] bool strict) { return {}; }
|
||||
virtual bool delete_binding(GlobalObject&, [[maybe_unused]] FlyString const& name) { return false; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue