From f08a46bd9e56717253adb326c132b85992bc6aac Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Tue, 14 Sep 2021 20:30:04 +0200 Subject: [PATCH] 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. --- Userland/Libraries/LibJS/Script.cpp | 3 ++- Userland/Libraries/LibJS/Script.h | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Userland/Libraries/LibJS/Script.cpp b/Userland/Libraries/LibJS/Script.cpp index 35e807bfc1..9a4b5460a4 100644 --- a/Userland/Libraries/LibJS/Script.cpp +++ b/Userland/Libraries/LibJS/Script.cpp @@ -30,7 +30,8 @@ NonnullRefPtr