mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-10 01:51:03 +09:00
LibWeb: Call page_did_start_loading from navigate()
This fixes a crash in Browser on Serenity
This commit is contained in:
parent
6522fa8933
commit
ae15b68b79
Notes:
sideshowbarker
2024-07-16 20:21:48 +09:00
Author: https://github.com/ADKaster
Commit: ae15b68b79
Pull-request: https://github.com/SerenityOS/serenity/pull/21093
1 changed files with 5 additions and 0 deletions
|
@ -999,6 +999,11 @@ WebIDL::ExceptionOr<void> Navigable::navigate(
|
||||||
// FIXME: 5. If continue is false, then return.
|
// FIXME: 5. If continue is false, then return.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (is_top_level_traversable()) {
|
||||||
|
if (auto* page = active_browsing_context()->page())
|
||||||
|
page->client().page_did_start_loading(url, false);
|
||||||
|
}
|
||||||
|
|
||||||
// 20. In parallel, run these steps:
|
// 20. In parallel, run these steps:
|
||||||
Platform::EventLoopPlugin::the().deferred_invoke([this, source_snapshot_params = move(source_snapshot_params), document_resource, url, navigation_id, referrer_policy, initiator_origin_snapshot, response, history_handling, initiator_base_url_snapshot] {
|
Platform::EventLoopPlugin::the().deferred_invoke([this, source_snapshot_params = move(source_snapshot_params), document_resource, url, navigation_id, referrer_policy, initiator_origin_snapshot, response, history_handling, initiator_base_url_snapshot] {
|
||||||
// NOTE: Not in the spec but subsequent steps will fail because destroyed navigable does not have active document.
|
// NOTE: Not in the spec but subsequent steps will fail because destroyed navigable does not have active document.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue