Commit 117d4594 authored by Raymond Toy's avatar Raymond Toy Committed by Commit Bot

Let Oilpan clear the AudioDestinationNode from the BaseAudioContext

Previously, we explicitly cleared the destination node in
BaseAudioContext::Clear(), called from
BaseAudioContext::Uninitialize().  But the destination node is a
Member variable of BaseAudioContext, and Oilpan can handle clearing
this when the context goes away.

In the bug, what was happening that the destination node was cleared,
but we were constructing the ScriptProcessorNode which needed
information from the destination to compute the appropriate buffer
size.  By not clearing the destination, we can compute the size.  The
destination node gets cleared when the context is collected.

Bug: 1132642
Change-Id: I7715bbce7a84f758c7c886a9635c277311622550
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2439436Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Reviewed-by: default avatarHongchan Choi <hongchan@chromium.org>
Commit-Queue: Raymond Toy <rtoy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#812232}
parent 50b42132
......@@ -141,7 +141,6 @@ void BaseAudioContext::Initialize() {
}
void BaseAudioContext::Clear() {
destination_node_.Clear();
// The audio rendering thread is dead. Nobody will schedule AudioHandler
// deletion. Let's do it ourselves.
GetDeferredTaskHandler().ClearHandlersToBeDeleted();
......
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