1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 02:27:35 +00:00

LibJS: Convert new_object_environment() to NonnullGCPtr

This commit is contained in:
Linus Groh 2022-12-15 20:02:57 +00:00 committed by Andreas Kling
parent 107e06a396
commit 111a38c464
5 changed files with 5 additions and 5 deletions

View file

@ -36,7 +36,7 @@ void WebContentConsoleClient::handle_input(DeprecatedString const& js_source)
auto& settings = Web::HTML::relevant_settings_object(*m_console_global_environment_extensions);
auto script = Web::HTML::ClassicScript::create("(console)", js_source, settings, settings.api_base_url());
JS::Environment* with_scope = JS::new_object_environment(*m_console_global_environment_extensions, true, &settings.realm().global_environment());
JS::NonnullGCPtr<JS::Environment> with_scope = JS::new_object_environment(*m_console_global_environment_extensions, true, &settings.realm().global_environment());
// FIXME: Add parse error printouts back once ClassicScript can report parse errors.
auto result = script->run(Web::HTML::ClassicScript::RethrowErrors::No, with_scope);