LibWeb: Remove unused ran_media_element_task variable

Writing to this variable triggered a stack use after return ASAN error.
This variable is safe to remove since it was written to but never read.
This commit is contained in:
Tim Ledbetter
2026-04-07 13:06:00 +01:00
committed by Jelle Raaijmakers
parent d4e0841176
commit 648ececa62
Notes: github-actions[bot] 2026-04-08 03:11:32 +00:00
2 changed files with 6 additions and 5 deletions

View File

@@ -1012,15 +1012,11 @@ void HTMLMediaElement::select_resource()
// -> If mode is object
case SelectMode::Object: {
auto failed_with_media_provider = [this](auto error_message) {
IGNORE_USE_IN_ESCAPING_LAMBDA bool ran_media_element_task = false;
// 4. Failed with media provider: Reaching this step indicates that the media resource failed to load. Take pending play promises and queue
// a media element task given the media element to run the dedicated media source failure steps with the result.
queue_a_media_element_task([this, &ran_media_element_task, error_message = move(error_message)]() mutable {
queue_a_media_element_task([this, error_message = move(error_message)]() mutable {
auto promises = take_pending_play_promises();
handle_media_source_failure(promises, move(error_message));
ran_media_element_task = true;
});
// 5. Wait for the task queued by the previous step to have executed.

View File

@@ -0,0 +1,5 @@
<!DOCTYPE html>
<video></video>
<script>
document.querySelector("video").srcObject = new Blob([], { type: "video/webm" });
</script>