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

Unified Diff: Source/modules/webaudio/AudioContext.h

Issue 349213007: WebAudio: Remove AudioNode::RefType. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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: Source/modules/webaudio/AudioContext.h
diff --git a/Source/modules/webaudio/AudioContext.h b/Source/modules/webaudio/AudioContext.h
index d6c9f8b94dd35250a394af0793db2307a907b594..fb35c1d1eb7e982a2b0f722f69865fd002bad416 100644
--- a/Source/modules/webaudio/AudioContext.h
+++ b/Source/modules/webaudio/AudioContext.h
@@ -268,10 +268,12 @@ private:
// Only accessed in the audio thread.
Vector<AudioNode*> m_finishedNodes;
- // We don't use RefPtr<AudioNode> here because AudioNode has a more complex ref() / deref() implementation
- // with an optional argument for refType. We need to use the special refType: RefTypeConnection
- // Either accessed when the graph lock is held, or on the main thread when the audio thread has finished.
- Vector<AudioNode*> m_referencedNodes;
+ // List of source nodes. This is either accessed when the graph lock is
+ // held, or on the main thread when the audio thread has finished.
+ // This RefPtr makes the node graph. We need to call AudioNode::
+ // wasConnected() after ref(), and call AudioNode::willBeDisconnected()
+ // before deref().
+ Vector<RefPtr<AudioNode> > m_referencedNodes;
// Accumulate nodes which need to be deleted here.
// This is copied to m_nodesToDelete at the end of a render cycle in handlePostRenderTasks(), where we're assured of a stable graph

Powered by Google App Engine
This is Rietveld 408576698