Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(820)

Unified Diff: third_party/WebKit/Source/modules/webaudio/AudioNodeInput.cpp

Issue 2429633003: Handle disabled outputs better when enabling. (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/webaudio/audionode-disconnect-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/webaudio/AudioNodeInput.cpp
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioNodeInput.cpp b/third_party/WebKit/Source/modules/webaudio/AudioNodeInput.cpp
index 89cfd0827f9f5515d3b8a479300c34de45e610eb..f91fbe038bfdc894ff4bcc67b0e4dafce9db55d5 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioNodeInput.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/AudioNodeInput.cpp
@@ -94,11 +94,13 @@ void AudioNodeInput::disable(AudioNodeOutput& output) {
void AudioNodeInput::enable(AudioNodeOutput& output) {
ASSERT(deferredTaskHandler().isGraphOwner());
- DCHECK(m_disabledOutputs.contains(&output));
// Move output from disabled list to active list.
m_outputs.add(&output);
- m_disabledOutputs.remove(&output);
+ if (m_disabledOutputs.size() > 0) {
+ DCHECK(m_disabledOutputs.contains(&output));
+ m_disabledOutputs.remove(&output);
+ }
changedOutputs();
// Propagate enabled state to outputs.
« no previous file with comments | « third_party/WebKit/LayoutTests/webaudio/audionode-disconnect-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698