mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-25 17:25:08 +02:00
LibWeb: Update gen counter on cancel of media element fetching process
This workaround avoids a crash that occurs when various fetching processes (in the media element) are quickly started and canceled. Although a better solution would be to actually remove the body callbacks when the fetch is stopped, this works for now.
This commit is contained in:
committed by
Gregory Bertilson
parent
8170926d4f
commit
900c593b6e
Notes:
github-actions[bot]
2026-03-07 00:36:01 +00:00
Author: https://github.com/acrilique 🔰 Commit: https://github.com/LadybirdBrowser/ladybird/commit/900c593b6ea Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/8282 Reviewed-by: https://github.com/Zaggy1024 ✅
@@ -197,6 +197,7 @@ void HTMLMediaElement::removed_from(DOM::Node* old_parent, DOM::Node& old_root)
|
||||
|
||||
void HTMLMediaElement::cancel_the_fetching_process()
|
||||
{
|
||||
m_current_fetch_generation++;
|
||||
m_fetch_data.clear();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user