Commit d866af57 authored by Raymond Toy's avatar Raymond Toy Committed by Chromium LUCI CQ

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: default avatarHongchan Choi <hongchan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#834265}
parent a60842e8
...@@ -141,9 +141,8 @@ void BaseAudioContext::Initialize() { ...@@ -141,9 +141,8 @@ void BaseAudioContext::Initialize() {
} }
void BaseAudioContext::Clear() { void BaseAudioContext::Clear() {
// The audio rendering thread is dead. Nobody will schedule AudioHandler // Make a note that we've cleared out the context so that there's no pending
// deletion. Let's do it ourselves. // activity.
GetDeferredTaskHandler().ClearHandlersToBeDeleted();
is_cleared_ = true; is_cleared_ = true;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment