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

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

Issue 393133003: Oilpan: WebAudio: Apply the weak HashMap pattern to remove an entry from AudioContext::m_dirtyAudio… (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add a comment, etc. Created 6 years, 5 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
« no previous file with comments | « Source/modules/webaudio/AudioSummingJunction.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/webaudio/AudioSummingJunction.cpp
diff --git a/Source/modules/webaudio/AudioSummingJunction.cpp b/Source/modules/webaudio/AudioSummingJunction.cpp
index f75df62584992f29b40ffac2b99ec562173ecdbe..12e5a300995f4b81a74530d7c2b032255ab0e417 100644
--- a/Source/modules/webaudio/AudioSummingJunction.cpp
+++ b/Source/modules/webaudio/AudioSummingJunction.cpp
@@ -38,14 +38,18 @@ AudioSummingJunction::AudioSummingJunction(AudioContext* context)
: m_context(context)
, m_renderingStateNeedUpdating(false)
{
+ ASSERT(context);
+#if ENABLE(OILPAN)
+ m_context->registerLiveAudioSummingJunction(*this);
+#endif
}
AudioSummingJunction::~AudioSummingJunction()
{
- // Oilpan: m_context is null if AudioContext and this object die
- // together. It's non-null if this object dies before AudioContext.
+#if !ENABLE(OILPAN)
if (m_renderingStateNeedUpdating && m_context.get())
m_context->removeMarkedSummingJunction(this);
+#endif
}
void AudioSummingJunction::trace(Visitor* visitor)
« no previous file with comments | « Source/modules/webaudio/AudioSummingJunction.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698