chore: cherry-pick d866af575997 from chromium #27391
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.
Clear handlers when the base context goes away.
Previously, in BaseAudioContext::Clear() we called
GetDeferredTaskHandler().ClearHandlersToBeDeleted(). But this was
also called in DeferredTaskHandler::ContextWillBeDestroyed(), which is
called in BaseAudioContext::~BaseAudioContext().
There's no need to call this twice while handling the audio context
going away.
Manually verified that the tests from issue 1125635 and 1153658 work,
and the deadlock in issue 1136571 is gone.
Bug: 1150065, 1153658
Change-Id: Iee15c31dc637bf82d66bfd79d5238b1f80813153
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2575418
Commit-Queue: Raymond Toy rtoy@chromium.org
Reviewed-by: Hongchan Choi hongchan@chromium.org
Cr-Commit-Position: refs/heads/master@{#834265}
Notes: Security: backported fix for 1150065, 1153658.