mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 19:59:17 +00:00
LibWeb: Invent a method to stop an in-progress fetch without errors
The HTMLMediaElement will need to stop fetching processes when its load algorithm is invoked while a fetch is ongoing. We don't have a way to really stop the process, due to the way it runs on nested deferred task invocations. So for now, this swaps the fetch callbacks (e.g. to process a fetch response) with empty callbacks.
This commit is contained in:
parent
1fb0c7826b
commit
8d4d01d99a
Notes:
sideshowbarker
2024-07-17 05:00:08 +09:00
Author: https://github.com/trflynn89
Commit: 8d4d01d99a
Pull-request: https://github.com/SerenityOS/serenity/pull/18431
3 changed files with 26 additions and 0 deletions
|
@ -17,6 +17,7 @@ FetchParams::FetchParams(JS::NonnullGCPtr<Request> request, JS::NonnullGCPtr<Fet
|
|||
, m_controller(controller)
|
||||
, m_timing_info(timing_info)
|
||||
{
|
||||
m_controller->set_fetch_params({}, *this);
|
||||
}
|
||||
|
||||
JS::NonnullGCPtr<FetchParams> FetchParams::create(JS::VM& vm, JS::NonnullGCPtr<Request> request, JS::NonnullGCPtr<FetchTimingInfo> timing_info)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue