LibWeb: Use SafeFunction for completion steps in "populate SHE"

...to visit GC-allocated objects captured by this callback.
This commit is contained in:
Aliaksandr Kalenik 2024-04-24 00:56:51 +02:00 committed by Andreas Kling
parent 64ad536dbb
commit 55154b6c68
Notes: sideshowbarker 2024-07-17 11:33:34 +09:00
2 changed files with 2 additions and 2 deletions

View file

@ -1025,7 +1025,7 @@ WebIDL::ExceptionOr<void> Navigable::populate_session_history_entry_document(
Variant<Empty, JS::NonnullGCPtr<NavigationParams>, JS::NonnullGCPtr<NonFetchSchemeNavigationParams>> navigation_params,
CSPNavigationType csp_navigation_type,
bool allow_POST,
Function<void()> completion_steps)
JS::SafeFunction<void()> completion_steps)
{
// FIXME: 1. Assert: this is running in parallel.

View file

@ -123,7 +123,7 @@ public:
Variant<Empty, JS::NonnullGCPtr<NavigationParams>, JS::NonnullGCPtr<NonFetchSchemeNavigationParams>> navigation_params = Empty {},
CSPNavigationType csp_navigation_type = CSPNavigationType::Other,
bool allow_POST = false,
Function<void()> completion_steps = [] {});
JS::SafeFunction<void()> completion_steps = [] {});
struct NavigateParams {
URL::URL const& url;