mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-11 18:20:43 +09: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
Notes:
sideshowbarker
2024-07-17 20:22:04 +09:00
Author: https://github.com/linusg
Commit: fc9d587e39
Pull-request: https://github.com/SerenityOS/serenity/pull/15438
Reviewed-by: https://github.com/davidot ✅
29 changed files with 243 additions and 217 deletions
|
@ -13,8 +13,8 @@ namespace JS {
|
|||
|
||||
// 27.6.3.1 AsyncGeneratorRequest Records, https://tc39.es/ecma262/#sec-asyncgeneratorrequest-records
|
||||
struct AsyncGeneratorRequest {
|
||||
Completion completion; // [[Completion]]
|
||||
PromiseCapability capability; // [[Capability]]
|
||||
Completion completion; // [[Completion]]
|
||||
NonnullGCPtr<PromiseCapability> capability; // [[Capability]]
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue