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

Side by Side Diff: third_party/WebKit/Source/modules/webaudio/AudioContext.cpp

Issue 2001533002: Clear DeferredTaskHandler's audio thread ID upon the thread going away. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 unified diff | Download patch
OLDNEW
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
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();
197 } 201 }
198 } 202 }
199 203
200 } // namespace blink 204 } // namespace blink
201 205
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698