mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-19 07:49:05 +00:00
LibWeb: Fix some GCVerifier warnings
This commit is contained in:
parent
8b8ada292e
commit
8450041b52
Notes:
sideshowbarker
2024-07-17 06:28:38 +09:00
Author: https://github.com/mattco98
Commit: 8450041b52
Pull-request: https://github.com/SerenityOS/serenity/pull/23861
Reviewed-by: https://github.com/awesomekling
23 changed files with 63 additions and 59 deletions
|
@ -888,7 +888,7 @@ void HTMLFormElement::plan_to_navigate_to(URL::URL url, Variant<Empty, String, P
|
|||
// NOTE: `this`, `actual_resource` and `target_navigable` are protected by JS::SafeFunction.
|
||||
queue_an_element_task(Task::Source::DOMManipulation, [this, url, post_resource, target_navigable, history_handling, referrer_policy, user_involvement]() {
|
||||
// 1. Set the form's planned navigation to null.
|
||||
m_planned_navigation = nullptr;
|
||||
m_planned_navigation = {};
|
||||
|
||||
// 2. Navigate targetNavigable to url using the form element's node document, with historyHandling set to historyHandling,
|
||||
// referrerPolicy set to referrerPolicy, documentResource set to postResource, and cspNavigationType set to "form-submission".
|
||||
|
|
|
@ -142,7 +142,7 @@ private:
|
|||
// https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#planned-navigation
|
||||
// Each form element has a planned navigation, which is either null or a task; when the form is first created,
|
||||
// its planned navigation must be set to null.
|
||||
Task const* m_planned_navigation { nullptr };
|
||||
JS::GCPtr<Task const> m_planned_navigation;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -13,16 +13,16 @@ TemporaryExecutionContext::TemporaryExecutionContext(EnvironmentSettingsObject&
|
|||
: m_environment_settings(environment_settings)
|
||||
, m_callbacks_enabled(callbacks_enabled)
|
||||
{
|
||||
m_environment_settings.prepare_to_run_script();
|
||||
m_environment_settings->prepare_to_run_script();
|
||||
if (m_callbacks_enabled == CallbacksEnabled::Yes)
|
||||
m_environment_settings.prepare_to_run_callback();
|
||||
m_environment_settings->prepare_to_run_callback();
|
||||
}
|
||||
|
||||
TemporaryExecutionContext::~TemporaryExecutionContext()
|
||||
{
|
||||
m_environment_settings.clean_up_after_running_script();
|
||||
m_environment_settings->clean_up_after_running_script();
|
||||
if (m_callbacks_enabled == CallbacksEnabled::Yes)
|
||||
m_environment_settings.clean_up_after_running_callback();
|
||||
m_environment_settings->clean_up_after_running_callback();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@ public:
|
|||
~TemporaryExecutionContext();
|
||||
|
||||
private:
|
||||
EnvironmentSettingsObject& m_environment_settings;
|
||||
JS::NonnullGCPtr<EnvironmentSettingsObject> m_environment_settings;
|
||||
CallbacksEnabled m_callbacks_enabled { CallbacksEnabled::No };
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue