chore: cherry-pick 2cd0af7ea205 from chromium #23015
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Use WeakPtr for cross-thread posting
{IIR,Biquad}FilterNodes check the state of the filter and notify the
main thread when it goes bad. In this process, the associated context
can be collected when a posted task is performed sometime later
in the task runner's queue.
By using WeakPtr, the task runner will not perform a scheduled task
in the queue when the target object is invalid anymore.
Test: Locally confirmed that the repro case does not crash after 30 min.
Bug: 1055788
Change-Id: Icdb3a7378d0345936b5b50e12ec2b187e58a611c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2074807
Commit-Queue: Hongchan Choi hongchan@chromium.org
Reviewed-by: Raymond Toy rtoy@chromium.org
Reviewed-by: Kentaro Hara haraken@chromium.org
Cr-Commit-Position: refs/heads/master@{#744936}
Notes: Security: backported fix for CVE-2020-6427: Use after free in audio.