LibWeb: Port populate_session_history_entry_document to HeapFunction

...For the completion steps. This is quite nice, as we can simply
capture this in the heap function where it is used instead of
needing to establish a new root.

Note that with these changes, to represent 'an empty algorithm', we now
use a null HeapFunction and do not invoke the steps.
This commit is contained in:
Shannon Booth 2024-08-18 15:41:50 +12:00 committed by Andreas Kling
commit b6d2ab2332
Notes: github-actions[bot] 2024-08-18 09:16:15 +00:00
3 changed files with 17 additions and 12 deletions

View file

@ -129,7 +129,7 @@ public:
NavigationParamsVariant navigation_params = Empty {},
CSPNavigationType csp_navigation_type = CSPNavigationType::Other,
bool allow_POST = false,
JS::SafeFunction<void()> completion_steps = [] {});
JS::GCPtr<JS::HeapFunction<void()>> completion_steps = {});
struct NavigateParams {
URL::URL const& url;