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:
Lluc Simó
2026-03-05 17:35:52 +01:00
committed by Gregory Bertilson
parent 8170926d4f
commit 900c593b6e
Notes: github-actions[bot] 2026-03-07 00:36:01 +00:00

View File

@@ -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();
}