mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-10 05:02:54 +00:00
LibWeb: Use HeapFunction directly in SessionHistoryTraversalQueue
This allows us to use HeapFunction all of the way down, allowing us to remove the Handle usage in after_session_callback for create_new_child_navigable.
This commit is contained in:
parent
b6d2ab2332
commit
fc83653f3c
Notes:
github-actions[bot]
2024-08-18 09:16:10 +00:00
Author: https://github.com/shannonbooth
Commit: fc83653f3c
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1108
Reviewed-by: https://github.com/awesomekling
8 changed files with 33 additions and 33 deletions
|
@ -665,7 +665,7 @@ WebIDL::ExceptionOr<NavigationResult> Navigation::perform_a_navigation_api_trave
|
|||
auto source_snapshot_params = document.snapshot_source_snapshot_params();
|
||||
|
||||
// 12. Append the following session history traversal steps to traversable:
|
||||
traversable->append_session_history_traversal_steps([key, api_method_tracker, navigable, source_snapshot_params, traversable, this] {
|
||||
traversable->append_session_history_traversal_steps(JS::create_heap_function(heap(), [key, api_method_tracker, navigable, source_snapshot_params, traversable, this] {
|
||||
// 1. Let navigableSHEs be the result of getting session history entries given navigable.
|
||||
auto navigable_shes = navigable->get_session_history_entries();
|
||||
|
||||
|
@ -727,7 +727,7 @@ WebIDL::ExceptionOr<NavigationResult> Navigation::perform_a_navigation_api_trave
|
|||
reject_the_finished_promise(api_method_tracker, WebIDL::SecurityError::create(realm, "Navigation disallowed from this origin"_fly_string));
|
||||
}));
|
||||
}
|
||||
});
|
||||
}));
|
||||
|
||||
// 13. Return a navigation API method tracker-derived result for apiMethodTracker.
|
||||
return navigation_api_method_tracker_derived_result(api_method_tracker);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue