LibWeb: Move vector of navigables in check_if_unloading_is_canceled

If we copy instead of move, the GC::Root source locations get
overwritten and we can't tell from a heap dump who created the roots.

(And it's also more efficient to move instead of copy ofc.)
This commit is contained in:
Andreas Kling
2025-12-21 17:57:30 -06:00
committed by Andreas Kling
parent 8af78cff30
commit 52da7b649b
Notes: github-actions[bot] 2025-12-24 09:20:52 +00:00

View File

@@ -1017,7 +1017,7 @@ TraversableNavigable::CheckIfUnloadingIsCanceledResult TraversableNavigable::che
TraversableNavigable::CheckIfUnloadingIsCanceledResult TraversableNavigable::check_if_unloading_is_canceled(Vector<GC::Root<Navigable>> navigables_that_need_before_unload)
{
return check_if_unloading_is_canceled(navigables_that_need_before_unload, {}, {}, {});
return check_if_unloading_is_canceled(move(navigables_that_need_before_unload), {}, {}, {});
}
Vector<GC::Ref<SessionHistoryEntry>> TraversableNavigable::get_session_history_entries_for_the_navigation_api(GC::Ref<Navigable> navigable, int target_step)