mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-09 01:29:17 +00:00
LibJS: Bring the explicit resource management implementation up to date
While we don't yet have a working `using` implementation with our byte code, we can still keep our DisposableStack implementation up to date. The changes brought in here are all editorial, and set us up to start an AsyncDisposableStack implementation.
This commit is contained in:
parent
f82b1c5a2d
commit
5ea0aa5f08
Notes:
github-actions[bot]
2025-01-17 19:47:35 +00:00
Author: https://github.com/trflynn89
Commit: 5ea0aa5f08
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3290
12 changed files with 375 additions and 258 deletions
|
@ -69,13 +69,13 @@ public:
|
|||
|
||||
[[nodiscard]] u64 environment_serial_number() const { return m_environment_serial_number; }
|
||||
|
||||
DisposeCapability const& dispose_capability() const { return m_dispose_capability; }
|
||||
DisposeCapability& dispose_capability() { return m_dispose_capability; }
|
||||
|
||||
private:
|
||||
ThrowCompletionOr<Value> get_binding_value_direct(VM&, Binding const&) const;
|
||||
ThrowCompletionOr<void> set_mutable_binding_direct(VM&, Binding&, Value, bool strict);
|
||||
|
||||
friend Completion dispose_resources(VM&, GC::Ptr<DeclarativeEnvironment>, Completion);
|
||||
Vector<DisposableResource> const& disposable_resource_stack() const { return m_disposable_resource_stack; }
|
||||
|
||||
protected:
|
||||
DeclarativeEnvironment();
|
||||
explicit DeclarativeEnvironment(Environment* parent_environment);
|
||||
|
@ -125,7 +125,7 @@ protected:
|
|||
private:
|
||||
Vector<Binding> m_bindings;
|
||||
HashMap<DeprecatedFlyString, size_t> m_bindings_assoc;
|
||||
Vector<DisposableResource> m_disposable_resource_stack;
|
||||
DisposeCapability m_dispose_capability;
|
||||
|
||||
u64 m_environment_serial_number { 0 };
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue