From fbefb19e10e2b0b52b4ba1759bf8093883ba4ade Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 15 Mar 2020 15:07:49 +0100 Subject: [PATCH] LibJS: Interpreter should make sure that the "this" stack gets marked --- Libraries/LibJS/Interpreter.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Libraries/LibJS/Interpreter.cpp b/Libraries/LibJS/Interpreter.cpp index dfbaa35ebb..f08839d5d2 100644 --- a/Libraries/LibJS/Interpreter.cpp +++ b/Libraries/LibJS/Interpreter.cpp @@ -144,6 +144,11 @@ void Interpreter::collect_roots(Badge, HashTable& roots) roots.set(it.value.value.as_cell()); } } + + for (auto& this_value : m_this_stack) { + if (this_value.is_cell()) + roots.set(this_value.as_cell()); + } } }