mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-20 01:01:54 +00:00
LibWeb: Make TemporaryExecutionContext take a Realm&
This commit is contained in:
parent
f7a4d94b24
commit
cc91473f4d
Notes:
github-actions[bot]
2024-11-02 00:56:36 +00:00
Author: https://github.com/shannonbooth
Commit: cc91473f4d
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1955
Reviewed-by: https://github.com/ADKaster ✅
34 changed files with 106 additions and 107 deletions
|
@ -9,20 +9,20 @@
|
|||
|
||||
namespace Web::HTML {
|
||||
|
||||
TemporaryExecutionContext::TemporaryExecutionContext(EnvironmentSettingsObject& environment_settings, CallbacksEnabled callbacks_enabled)
|
||||
: m_environment_settings(environment_settings)
|
||||
TemporaryExecutionContext::TemporaryExecutionContext(JS::Realm& realm, CallbacksEnabled callbacks_enabled)
|
||||
: m_realm(realm)
|
||||
, m_callbacks_enabled(callbacks_enabled)
|
||||
{
|
||||
prepare_to_run_script(m_environment_settings->realm());
|
||||
prepare_to_run_script(m_realm);
|
||||
if (m_callbacks_enabled == CallbacksEnabled::Yes)
|
||||
prepare_to_run_callback(m_environment_settings->realm());
|
||||
prepare_to_run_callback(m_realm);
|
||||
}
|
||||
|
||||
TemporaryExecutionContext::~TemporaryExecutionContext()
|
||||
{
|
||||
clean_up_after_running_script(m_environment_settings->realm());
|
||||
clean_up_after_running_script(m_realm);
|
||||
if (m_callbacks_enabled == CallbacksEnabled::Yes)
|
||||
clean_up_after_running_callback(m_environment_settings->realm());
|
||||
clean_up_after_running_callback(m_realm);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue