mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02:00
LibWeb: Forbid sharing image requests across documents
This change addresses the bug where images unable to load when the reload button in the UI is clicked repeatedly. Before this fix, it was possible to use SharedImageRequests across multiple documents. However, when the document that initiated the request is gone, tasks scheduled on the event loop remain in the fetching state because the originating document is no longer active. Furthermore, another reason to prohibit the sharing of image requests across documents is that the "Origin" header in an image request is dependent on the document.
This commit is contained in:
committed by
Andreas Kling
parent
c2eaa0eb1c
commit
8ebb4e8047
Notes:
sideshowbarker
2024-07-18 00:54:03 +09:00
Author: https://github.com/kalenikaliaksandr Commit: https://github.com/SerenityOS/serenity/commit/8ebb4e8047 Pull-request: https://github.com/SerenityOS/serenity/pull/21476
@@ -3555,4 +3555,9 @@ void Document::update_for_history_step_application(JS::NonnullGCPtr<HTML::Sessio
|
||||
}
|
||||
}
|
||||
|
||||
HashMap<AK::URL, HTML::SharedImageRequest*>& Document::shared_image_requests()
|
||||
{
|
||||
return m_shared_image_requests;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user