OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "modules/webaudio/AudioContext.h" | 5 #include "modules/webaudio/AudioContext.h" |
6 | 6 |
7 #include "bindings/core/v8/ExceptionMessages.h" | 7 #include "bindings/core/v8/ExceptionMessages.h" |
8 #include "bindings/core/v8/ExceptionState.h" | 8 #include "bindings/core/v8/ExceptionState.h" |
9 #include "bindings/core/v8/ScriptPromiseResolver.h" | 9 #include "bindings/core/v8/ScriptPromiseResolver.h" |
10 #include "core/dom/DOMException.h" | 10 #include "core/dom/DOMException.h" |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 | 187 |
188 void AudioContext::stopRendering() | 188 void AudioContext::stopRendering() |
189 { | 189 { |
190 ASSERT(isMainThread()); | 190 ASSERT(isMainThread()); |
191 ASSERT(destination()); | 191 ASSERT(destination()); |
192 | 192 |
193 if (contextState() == Running) { | 193 if (contextState() == Running) { |
194 destination()->audioDestinationHandler().stopRendering(); | 194 destination()->audioDestinationHandler().stopRendering(); |
195 setContextState(Suspended); | 195 setContextState(Suspended); |
196 deferredTaskHandler().clearHandlersToBeDeleted(); | 196 deferredTaskHandler().clearHandlersToBeDeleted(); |
197 // The recorded audio thread will be shut down as part | |
198 // of stopping, so clear that association to avoid | |
199 // future confusion (crbug.com/612127) | |
200 deferredTaskHandler().clearAudioThread(); | |
201 } | 197 } |
202 } | 198 } |
203 | 199 |
204 } // namespace blink | 200 } // namespace blink |
205 | 201 |
OLD | NEW |