mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 03:27:45 +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
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());
|
ASSERT(m_page_view->document());
|
||||||
auto& old_interpreter = m_page_view->document()->interpreter();
|
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) {
|
if (!m_js_test_common) {
|
||||||
auto result = parse_file(String::format("%s/test-common.js", m_js_test_root.characters()));
|
auto result = parse_file(String::format("%s/test-common.js", m_js_test_root.characters()));
|
||||||
if (result.is_error()) {
|
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");
|
Web::HTML::HTMLDocumentParser parser(document, data, "utf-8");
|
||||||
auto& new_interpreter = parser.document().interpreter();
|
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__"
|
// Setup the test environment and call "__BeforeInitialPageLoad__"
|
||||||
new_interpreter.global_object().define_property(
|
new_interpreter.global_object().define_property(
|
||||||
"libweb_tester",
|
"libweb_tester",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue