summaryrefslogtreecommitdiff
path: root/Userland/Utilities
diff options
context:
space:
mode:
authorLuke <luke.wilde@live.co.uk>2021-02-20 08:42:41 +0000
committerAndreas Kling <kling@serenityos.org>2021-02-20 10:48:34 +0100
commit0304f7bbbe0861bdd8cff54e400e5ae1fe0a53bc (patch)
treeaef9f7164512280486f02aaa486a95dc503d1ac9 /Userland/Utilities
parent7e959d74307ed7dfca7c7a3d6b13b24f97dc56c9 (diff)
downloadserenity-0304f7bbbe0861bdd8cff54e400e5ae1fe0a53bc.zip
test-web: Create execution scope for new interpreter instead of the old one
It was accidentally creating a scope for the old interpreter instead of the new one. Fixes #5415
Diffstat (limited to 'Userland/Utilities')
-rw-r--r--Userland/Utilities/test-web.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Utilities/test-web.cpp b/Userland/Utilities/test-web.cpp
index b63029ab53..040eb90a3e 100644
--- a/Userland/Utilities/test-web.cpp
+++ b/Userland/Utilities/test-web.cpp
@@ -306,9 +306,6 @@ JSFileResult TestRunner::run_file_test(const String& test_path)
ASSERT(m_page_view->document());
auto& old_interpreter = m_page_view->document()->interpreter();
- // FIXME: This is a hack while we're refactoring Interpreter/VM stuff.
- JS::VM::InterpreterExecutionScope scope(old_interpreter);
-
if (!m_js_test_common) {
auto result = parse_file(String::format("%s/test-common.js", m_js_test_root.characters()));
if (result.is_error()) {
@@ -354,6 +351,9 @@ JSFileResult TestRunner::run_file_test(const String& test_path)
Web::HTML::HTMLDocumentParser parser(document, data, "utf-8");
auto& new_interpreter = parser.document().interpreter();
+ // FIXME: This is a hack while we're refactoring Interpreter/VM stuff.
+ JS::VM::InterpreterExecutionScope scope(new_interpreter);
+
// Setup the test environment and call "__BeforeInitialPageLoad__"
new_interpreter.global_object().define_property(
"libweb_tester",