mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-05 15:49:11 +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
|
@ -23,7 +23,7 @@ struct SessionHistoryTraversalQueueEntry : public JS::Cell {
|
|||
JS_DECLARE_ALLOCATOR(SessionHistoryTraversalQueueEntry);
|
||||
|
||||
public:
|
||||
static JS::NonnullGCPtr<SessionHistoryTraversalQueueEntry> create(JS::VM& vm, Function<void()> steps, JS::GCPtr<HTML::Navigable> target_navigable);
|
||||
static JS::NonnullGCPtr<SessionHistoryTraversalQueueEntry> create(JS::VM& vm, JS::NonnullGCPtr<JS::HeapFunction<void()>> steps, JS::GCPtr<HTML::Navigable> target_navigable);
|
||||
|
||||
JS::GCPtr<HTML::Navigable> target_navigable() const { return m_target_navigable; }
|
||||
void execute_steps() const { m_steps->function()(); }
|
||||
|
@ -49,8 +49,8 @@ class SessionHistoryTraversalQueue : public JS::Cell {
|
|||
public:
|
||||
SessionHistoryTraversalQueue();
|
||||
|
||||
void append(Function<void()> steps);
|
||||
void append_sync(Function<void()> steps, JS::GCPtr<Navigable> target_navigable);
|
||||
void append(JS::NonnullGCPtr<JS::HeapFunction<void()>> steps);
|
||||
void append_sync(JS::NonnullGCPtr<JS::HeapFunction<void()>> steps, JS::GCPtr<Navigable> target_navigable);
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/browsing-the-web.html#sync-navigations-jump-queue
|
||||
JS::GCPtr<SessionHistoryTraversalQueueEntry> first_synchronous_navigation_steps_with_target_navigable_not_contained_in(HashTable<JS::NonnullGCPtr<Navigable>> const&);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue