mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-24 02:09:28 +00:00
LibJS: Change Interpreter::create_with_existing_{global_object => realm}
We need both a GlobalObject and Realm now, but can get the former from the latter (once initialized). This also fixes JS execution in LibWeb, as we failed to set the Realm of the newly created Interpreter in this function.
This commit is contained in:
committed by
Andreas Kling
parent
106f295916
commit
7b92889e6b
@@ -53,7 +53,7 @@ JS::Value ClassicScript::run(RethrowErrors rethrow_errors)
|
||||
{
|
||||
(void)rethrow_errors;
|
||||
|
||||
auto interpreter = JS::Interpreter::create_with_existing_global_object(m_script_record->realm().global_object());
|
||||
auto interpreter = JS::Interpreter::create_with_existing_realm(m_script_record->realm());
|
||||
interpreter->run(interpreter->global_object(), m_script_record->parse_node());
|
||||
auto& vm = interpreter->vm();
|
||||
if (vm.exception())
|
||||
|
||||
Reference in New Issue
Block a user