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

Unified Diff: third_party/WebKit/Source/modules/webaudio/BaseAudioContext.h

Issue 2638413004: Don't run removeFinishedSourceNodes with the context lock. (Closed)
Patch Set: Created 3 years, 11 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
Index: third_party/WebKit/Source/modules/webaudio/BaseAudioContext.h
diff --git a/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.h b/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.h
index df15848401ff83c9dce84fe4a75f2547f6920091..0e929948d2313eae6e4aea73099d29148dc41c55 100644
--- a/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.h
+++ b/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.h
@@ -249,9 +249,16 @@ class MODULES_EXPORT BaseAudioContext
// Called at the end of each render quantum.
void handlePostRenderTasks();
- // Called periodically at the end of each render quantum to release finished
- // source nodes.
- void releaseFinishedSourceNodes();
+ // Called periodically at the end of each render quantum to release
+ // finished source nodes. Updates m_finishedSourceNodes with nodes
+ // to be deleted. Returns true if any node needs deletion. Must be
+ // run from the audio thread.
+ bool releaseFinishedSourceNodes();
+
+ // Actually remove the nodes noted for deletion by
+ // releaseFinishedSourceNodes. Must be run from the main thread,
+ // and must not be run with the context lock.
+ void removeFinishedSourceNodes();
// Keeps track of the number of connections made.
void incrementConnectionCount() {
@@ -379,8 +386,6 @@ class MODULES_EXPORT BaseAudioContext
// haven't finished playing. Make sure to release them here.
void releaseActiveSourceNodes();
- void removeFinishedSourceNodes();
-
// Listener for the PannerNodes
Member<AudioListener> m_listener;

Powered by Google App Engine
This is Rietveld 408576698