Chromium Code Reviews| Index: third_party/WebKit/Source/modules/webaudio/DeferredTaskHandler.cpp |
| diff --git a/third_party/WebKit/Source/modules/webaudio/DeferredTaskHandler.cpp b/third_party/WebKit/Source/modules/webaudio/DeferredTaskHandler.cpp |
| index d294fe8fa80585e76e0331a63cb657d395b0f72c..8cbecfc07b38c89ce60357434018d0589fa663b0 100644 |
| --- a/third_party/WebKit/Source/modules/webaudio/DeferredTaskHandler.cpp |
| +++ b/third_party/WebKit/Source/modules/webaudio/DeferredTaskHandler.cpp |
| @@ -131,9 +131,14 @@ void DeferredTaskHandler::handleDirtyAudioNodeOutputs() |
| { |
| ASSERT(isGraphOwner()); |
| - for (AudioNodeOutput* output : m_dirtyAudioNodeOutputs) |
| + HashSet<AudioNodeOutput*> dirtyOutputs; |
| + m_dirtyAudioNodeOutputs.swap(dirtyOutputs); |
|
hongchan
2016/05/23 20:43:34
What if this swapping happens when the audio threa
sof
2016/05/23 21:06:30
No, the calling context will have to guarantee exc
|
| + |
| + // Note: the updating of rendering state may cause output nodes |
| + // further down the chain to be marked as dirty. These will not |
| + // be processed in this render quantum. |
| + for (AudioNodeOutput* output : dirtyOutputs) |
| output->updateRenderingState(); |
| - m_dirtyAudioNodeOutputs.clear(); |
| } |
| void DeferredTaskHandler::addAutomaticPullNode(AudioHandler* node) |