mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-11 10:18:15 +09:00
LibWeb: Only return initialized navigables from child_navigables()
Fixes a crash in `get_session_history_entries()` that happens when it attempts to find entries for a navigable that hasn't been fully initialized and therefore doesn't have a nested history entry yet.
This commit is contained in:
parent
15d265da65
commit
fbc95440a4
Notes:
sideshowbarker
2024-07-17 07:14:09 +09:00
Author: https://github.com/kalenikaliaksandr
Commit: fbc95440a4
Pull-request: https://github.com/SerenityOS/serenity/pull/21093
1 changed files with 2 additions and 0 deletions
|
@ -62,6 +62,8 @@ Vector<JS::Handle<Navigable>> Navigable::child_navigables() const
|
||||||
{
|
{
|
||||||
Vector<JS::Handle<Navigable>> results;
|
Vector<JS::Handle<Navigable>> results;
|
||||||
for (auto& entry : all_navigables()) {
|
for (auto& entry : all_navigables()) {
|
||||||
|
if (entry->current_session_history_entry()->step == SessionHistoryEntry::Pending::Tag)
|
||||||
|
continue;
|
||||||
if (entry->parent() == this)
|
if (entry->parent() == this)
|
||||||
results.append(entry);
|
results.append(entry);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue