mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 18:27:39 +00:00
LibJS: Store PrivateElement values in Handle<Value>
This fixes an issue where private element values were not always protected from GC. I found two instances where this was happening: - ECMAScriptFunctionObject did not mark m_private_methods - ClassDefinitionEvaluation had two Vector<PrivateElement> that were opaque to the garbage collector, and so if GC occurred while constructing a class instance, some or all of its private elements could get incorrectly collected.
This commit is contained in:
parent
0eddee44f3
commit
5617dd1c83
3 changed files with 14 additions and 19 deletions
|
@ -36,7 +36,7 @@ struct PrivateElement {
|
|||
|
||||
PrivateName key;
|
||||
Kind kind { Kind::Field };
|
||||
Value value;
|
||||
Handle<Value> value;
|
||||
};
|
||||
|
||||
class Object : public Cell {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue