From 55154b6c685a12b456beff4f35ab71f22a069e97 Mon Sep 17 00:00:00 2001 From: Aliaksandr Kalenik Date: Wed, 24 Apr 2024 00:56:51 +0200 Subject: [PATCH] LibWeb: Use SafeFunction for completion steps in "populate SHE" ...to visit GC-allocated objects captured by this callback. --- Userland/Libraries/LibWeb/HTML/Navigable.cpp | 2 +- Userland/Libraries/LibWeb/HTML/Navigable.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Userland/Libraries/LibWeb/HTML/Navigable.cpp b/Userland/Libraries/LibWeb/HTML/Navigable.cpp index e9eb7a05ad1..042ccccc35d 100644 --- a/Userland/Libraries/LibWeb/HTML/Navigable.cpp +++ b/Userland/Libraries/LibWeb/HTML/Navigable.cpp @@ -1025,7 +1025,7 @@ WebIDL::ExceptionOr Navigable::populate_session_history_entry_document( Variant, JS::NonnullGCPtr> navigation_params, CSPNavigationType csp_navigation_type, bool allow_POST, - Function completion_steps) + JS::SafeFunction completion_steps) { // FIXME: 1. Assert: this is running in parallel. diff --git a/Userland/Libraries/LibWeb/HTML/Navigable.h b/Userland/Libraries/LibWeb/HTML/Navigable.h index 6ba2c7a5999..9de036735c2 100644 --- a/Userland/Libraries/LibWeb/HTML/Navigable.h +++ b/Userland/Libraries/LibWeb/HTML/Navigable.h @@ -123,7 +123,7 @@ public: Variant, JS::NonnullGCPtr> navigation_params = Empty {}, CSPNavigationType csp_navigation_type = CSPNavigationType::Other, bool allow_POST = false, - Function completion_steps = [] {}); + JS::SafeFunction completion_steps = [] {}); struct NavigateParams { URL::URL const& url;