Index: Source/modules/webaudio/AudioNode.cpp |
diff --git a/Source/modules/webaudio/AudioNode.cpp b/Source/modules/webaudio/AudioNode.cpp |
index f26bccb49dbe51a2893bbe7dea1c4046041354c4..76d3d13bf51a65737ed782dd9a472b54d6790a1b 100644 |
--- a/Source/modules/webaudio/AudioNode.cpp |
+++ b/Source/modules/webaudio/AudioNode.cpp |
@@ -48,6 +48,7 @@ AudioNode::AudioNode(AudioContext* context, float sampleRate) |
, m_nodeType(NodeTypeUnknown) |
, m_context(context) |
, m_sampleRate(sampleRate) |
+ , m_keepAlive(adoptPtr(new Persistent<AudioNode>(this))) |
, m_lastProcessingTime(-1) |
, m_lastNonSilentTime(-1) |
, m_normalRefCount(1) // start out with normal refCount == 1 (like WTF::RefCounted class) |
@@ -586,6 +587,17 @@ void AudioNode::printNodeCounts() |
#endif // DEBUG_AUDIONODE_REFERENCES |
+void AudioNode::trace(Visitor* visitor) |
+{ |
+ visitor->trace(m_context); |
+} |
+ |
+void AudioNode::clearKeepAlive() |
+{ |
+ ASSERT(m_keepAlive); |
+ m_keepAlive = nullptr; |
+} |
+ |
} // namespace WebCore |
#endif // ENABLE(WEB_AUDIO) |