mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-25 17:25:08 +02:00
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:
committed by
Jelle Raaijmakers
parent
d4e0841176
commit
648ececa62
Notes:
github-actions[bot]
2026-04-08 03:11:32 +00:00
Author: https://github.com/tcl3 Commit: https://github.com/LadybirdBrowser/ladybird/commit/648ececa622 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/8818 Reviewed-by: https://github.com/Zaggy1024 ✅ Reviewed-by: https://github.com/gmta ✅
@@ -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.
|
||||
|
||||
5
Tests/LibWeb/Crash/HTML/media-srcObject-blob.html
Normal file
5
Tests/LibWeb/Crash/HTML/media-srcObject-blob.html
Normal file
@@ -0,0 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<video></video>
|
||||
<script>
|
||||
document.querySelector("video").srcObject = new Blob([], { type: "video/webm" });
|
||||
</script>
|
||||
Reference in New Issue
Block a user