mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-03-22 04:34:44 +00:00
Fix leak introduced in inner navigation refactoring
A inner-navigate event can override an existing pending queued navigation. When it does, the previously queued navigation has to be cleaned up. We were doing this, but it must have been stripped out when navigation was refactored to work with frames.
This commit is contained in:
@@ -652,6 +652,10 @@ fn scheduleNavigationWithArena(originator: *Page, arena: Allocator, request_url:
|
|||||||
.navigation_type = std.meta.activeTag(nt),
|
.navigation_type = std.meta.activeTag(nt),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (target._queued_navigation) |existing| {
|
||||||
|
target.arena_pool.release(existing.arena);
|
||||||
|
}
|
||||||
|
|
||||||
target._queued_navigation = qn;
|
target._queued_navigation = qn;
|
||||||
return session.scheduleNavigation(target);
|
return session.scheduleNavigation(target);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user