mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:17:36 +00:00
LibJS: Make JS::Script keep the VM alive
Script has a Handle member (m_realm), and for handles to remain valid, the VM must stay alive.
This commit is contained in:
parent
d553fd7f4f
commit
f08a46bd9e
2 changed files with 5 additions and 1 deletions
|
@ -26,6 +26,9 @@ public:
|
|||
private:
|
||||
Script(Realm&, NonnullRefPtr<Program>);
|
||||
|
||||
// Handles are not safe unless we keep the VM alive.
|
||||
NonnullRefPtr<VM> m_vm;
|
||||
|
||||
Handle<Realm> m_realm; // [[Realm]]
|
||||
NonnullRefPtr<Program> m_parse_node; // [[ECMAScriptCode]]
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue