1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 15:27:35 +00:00

LibJS: Add an initialize binding hint to all initialize_binding methods

This will allow us to specify things like SyncDispose and perhaps
AsyncDispose in the future.
This commit is contained in:
davidot 2022-12-14 13:26:10 +01:00 committed by Linus Groh
parent 3353cf68f1
commit a746739cb0
14 changed files with 68 additions and 57 deletions

View file

@ -22,7 +22,7 @@ public:
virtual ThrowCompletionOr<bool> has_binding(DeprecatedFlyString const& name, Optional<size_t>* = nullptr) const override;
virtual ThrowCompletionOr<void> create_mutable_binding(VM&, DeprecatedFlyString const& name, bool can_be_deleted) override;
virtual ThrowCompletionOr<void> create_immutable_binding(VM&, DeprecatedFlyString const& name, bool strict) override;
virtual ThrowCompletionOr<void> initialize_binding(VM&, DeprecatedFlyString const& name, Value) override;
virtual ThrowCompletionOr<void> initialize_binding(VM&, DeprecatedFlyString const& name, Value, Environment::InitializeBindingHint) override;
virtual ThrowCompletionOr<void> set_mutable_binding(VM&, DeprecatedFlyString const& name, Value, bool strict) override;
virtual ThrowCompletionOr<Value> get_binding_value(VM&, DeprecatedFlyString const& name, bool strict) override;
virtual ThrowCompletionOr<bool> delete_binding(VM&, DeprecatedFlyString const& name) override;