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

Unified Diff: Source/modules/webaudio/AudioNode.cpp

Issue 205173002: Move webaudio to oilpan (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed Created 6 years, 8 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/AudioNode.cpp
diff --git a/Source/modules/webaudio/AudioNode.cpp b/Source/modules/webaudio/AudioNode.cpp
index b6892a3f2a6238e5fcd1c9f50f367feff57ff15c..866c8777ae68da0ef521290cfa668c2b2f2d630f 100644
--- a/Source/modules/webaudio/AudioNode.cpp
+++ b/Source/modules/webaudio/AudioNode.cpp
@@ -48,6 +48,9 @@ AudioNode::AudioNode(AudioContext* context, float sampleRate)
, m_nodeType(NodeTypeUnknown)
, m_context(context)
, m_sampleRate(sampleRate)
+#if ENABLE(OILPAN)
+ , m_keepAlive(adoptPtr(new Persistent<AudioNode>(this)))
+#endif
, m_lastProcessingTime(-1)
, m_lastNonSilentTime(-1)
, m_normalRefCount(1) // start out with normal refCount == 1 (like WTF::RefCounted class)
@@ -473,6 +476,7 @@ void AudioNode::disableOutputsIfNecessary()
void AudioNode::ref(RefType refType)
{
+ ASSERT(m_keepAlive);
haraken 2014/04/08 06:02:08 Add #if ENABLE(OILPAN)
keishi 2014/04/21 17:10:11 Done.
switch (refType) {
case RefTypeNormal:
atomicIncrement(&m_normalRefCount);
@@ -587,6 +591,19 @@ void AudioNode::printNodeCounts()
#endif // DEBUG_AUDIONODE_REFERENCES
+void AudioNode::trace(Visitor* visitor)
+{
+ visitor->trace(m_context);
+}
+
+#if ENABLE(OILPAN)
+void AudioNode::clearKeepAlive()
+{
+ ASSERT(m_keepAlive);
+ m_keepAlive = nullptr;
+}
+#endif
+
} // namespace WebCore
#endif // ENABLE(WEB_AUDIO)

Powered by Google App Engine
This is Rietveld 408576698