Bug 914030 - Shutdown an OfflineAudioContext when it has completed. r=ehsan, a=akeybl
authorKarl Tomlinson <karlt+@karlt.net>
Tue, 10 Sep 2013 17:10:36 +1200
changeset 154094 2f1d4aea750edf61955f25bfd5d0f89af8af8be0
parent 154093 dde022e033510d8c2d5e4ec832e3762113e94189
child 154095 439302ba8435809c29aea814a246d28c3388b945
push id1
push usersledru@mozilla.com
push dateThu, 04 Dec 2014 17:57:20 +0000
reviewersehsan, akeybl
bugs914030
milestone25.0
Bug 914030 - Shutdown an OfflineAudioContext when it has completed. r=ehsan, a=akeybl This is needed to remove self-references in the graph when no more processing will take place on the graph.
content/media/webaudio/AudioDestinationNode.cpp
--- a/content/media/webaudio/AudioDestinationNode.cpp
+++ b/content/media/webaudio/AudioDestinationNode.cpp
@@ -125,16 +125,17 @@ public:
           AudioNode* node = mStream->Engine()->Node();
           if (node) {
             context = node->Context();
           }
         }
         if (!context) {
           return NS_OK;
         }
+        context->Shutdown();
 
         AutoPushJSContext cx(context->GetJSContext());
         if (cx) {
           JSAutoRequest ar(cx);
 
           // Create the input buffer
           nsRefPtr<AudioBuffer> renderedBuffer = new AudioBuffer(context,
                                                                  mLength,