mirror of
https://github.com/RGBCube/serenity
synced 2025-06-28 20:52:08 +00:00
LibJS: Make PromiseCapability GC-allocated
A struct with three raw pointers to other GC'd types is a pretty big liability, let's just turn this into a Cell itself. This comes with the additional benefit of being able to capture it in a lambda effortlessly, without having to create handles for individual members.
This commit is contained in:
parent
0585029c30
commit
fc9d587e39
29 changed files with 243 additions and 217 deletions
|
@ -34,7 +34,7 @@ public:
|
|||
|
||||
protected:
|
||||
virtual ThrowCompletionOr<void> initialize_environment(VM& vm) override;
|
||||
virtual ThrowCompletionOr<void> execute_module(VM& vm, Optional<PromiseCapability> capability) override;
|
||||
virtual ThrowCompletionOr<void> execute_module(VM& vm, GCPtr<PromiseCapability> capability) override;
|
||||
|
||||
private:
|
||||
SourceTextModule(Realm&, StringView filename, bool has_top_level_await, NonnullRefPtr<Program> body, Vector<ModuleRequest> requested_modules,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue