LibWeb: Change HTML::Script to hold a realm instead of settings object

This is part of a refactor needed for introduction of the shadow realm
proposal in the web platform.
This commit is contained in:
Shannon Booth 2024-10-25 16:27:26 +13:00 committed by Andrew Kaster
parent 0382933a0a
commit da18551f10
Notes: github-actions[bot] 2024-11-02 00:56:21 +00:00
17 changed files with 164 additions and 155 deletions

View file

@ -64,10 +64,9 @@ void SVGScriptElement::process_the_script_element()
HTML::main_thread_event_loop().spin_until(JS::create_heap_function(heap(), [&] { return m_document->ready_to_run_scripts(); }));
// FIXME: Support non-inline scripts.
auto& settings_object = document().relevant_settings_object();
auto base_url = document().base_url();
m_script = HTML::ClassicScript::create(m_document->url().to_byte_string(), inline_script, settings_object, base_url, m_source_line_number);
m_script = HTML::ClassicScript::create(m_document->url().to_byte_string(), inline_script, realm(), base_url, m_source_line_number);
(void)m_script->run();
}