mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-01 15:18:06 +00:00
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
This commit is contained in:
parent
7e959d7430
commit
0304f7bbbe
Notes:
sideshowbarker
2024-07-18 22:07:38 +09:00
Author: https://github.com/Lubrsi
Commit: 0304f7bbbe
Pull-request: https://github.com/SerenityOS/serenity/pull/5420
Issue: https://github.com/SerenityOS/serenity/issues/5415
1 changed files with 3 additions and 3 deletions
|
@ -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",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue