LibJS: Don't leak class field initializers

We were storing these in Handle (strong GC roots) hanging off of
ECMAScriptFunctionObject which effectively turned into world leaks.
This commit is contained in:
Andreas Kling
2024-11-10 13:03:38 +01:00
committed by Andreas Kling
parent 8c809fa5ee
commit 5aa1d7837f
4 changed files with 7 additions and 6 deletions

View File

@@ -17,8 +17,8 @@ using ClassElementName = Variant<PropertyKey, PrivateName>;
// 6.2.10 The ClassFieldDefinition Record Specification Type, https://tc39.es/ecma262/#sec-classfielddefinition-record-specification-type
struct ClassFieldDefinition {
ClassElementName name; // [[Name]]
Handle<ECMAScriptFunctionObject> initializer; // [[Initializer]]
ClassElementName name; // [[Name]]
GCPtr<ECMAScriptFunctionObject> initializer; // [[Initializer]]
};
}