mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-25 17:15:44 +00:00
Ladybird/ConsoleClient: Get the current ESO from new HostDefined helper
This commit is contained in:
@@ -32,7 +32,7 @@ ConsoleClient::ConsoleClient(JS::Console& console, JS::Realm& realm, SimpleWebVi
|
||||
|
||||
// NOTE: We need to push an execution context here for NativeFunction::create() to succeed during global object initialization.
|
||||
// It gets removed immediately after creating the interpreter in Document::interpreter().
|
||||
auto& eso = verify_cast<Web::HTML::EnvironmentSettingsObject>(*realm.host_defined());
|
||||
auto& eso = Web::Bindings::host_defined_environment_settings_object(realm);
|
||||
vm.push_execution_context(eso.realm_execution_context());
|
||||
console_global_object->initialize(realm);
|
||||
vm.pop_execution_context();
|
||||
@@ -45,7 +45,7 @@ void ConsoleClient::handle_input(String const& js_source)
|
||||
if (!m_realm)
|
||||
return;
|
||||
|
||||
auto& settings = verify_cast<Web::HTML::EnvironmentSettingsObject>(*m_realm->host_defined());
|
||||
auto& settings = Web::Bindings::host_defined_environment_settings_object(*m_realm);
|
||||
auto script = Web::HTML::ClassicScript::create("(console)", js_source, settings, settings.api_base_url());
|
||||
|
||||
// FIXME: Add parse error printouts back once ClassicScript can report parse errors.
|
||||
|
||||
Reference in New Issue
Block a user