Title: [118099] trunk/Source/WebCore
Revision
118099
Author
[email protected]
Date
2012-05-22 19:11:25 -0700 (Tue, 22 May 2012)

Log Message

AudioNodeOutput::disconnectAllParams() must take care when iterating through its parameter list
https://bugs.webkit.org/show_bug.cgi?id=87190

Reviewed by Kenneth Russell.

No new tests. Covered by existing tests.

* Modules/webaudio/AudioNodeOutput.cpp:
(WebCore::AudioNodeOutput::disconnectAllParams):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (118098 => 118099)


--- trunk/Source/WebCore/ChangeLog	2012-05-23 02:03:09 UTC (rev 118098)
+++ trunk/Source/WebCore/ChangeLog	2012-05-23 02:11:25 UTC (rev 118099)
@@ -1,3 +1,15 @@
+2012-05-22  Chris Rogers  <[email protected]>
+
+        AudioNodeOutput::disconnectAllParams() must take care when iterating through its parameter list
+        https://bugs.webkit.org/show_bug.cgi?id=87190
+
+        Reviewed by Kenneth Russell.
+
+        No new tests. Covered by existing tests.
+
+        * Modules/webaudio/AudioNodeOutput.cpp:
+        (WebCore::AudioNodeOutput::disconnectAllParams):
+
 2012-05-22  MORITA Hajime  <[email protected]>
 
         <shadow> and <content> should be hidden behind ContextEnabledFeatures

Modified: trunk/Source/WebCore/Modules/webaudio/AudioNodeOutput.cpp (118098 => 118099)


--- trunk/Source/WebCore/Modules/webaudio/AudioNodeOutput.cpp	2012-05-23 02:03:09 UTC (rev 118098)
+++ trunk/Source/WebCore/Modules/webaudio/AudioNodeOutput.cpp	2012-05-23 02:11:25 UTC (rev 118099)
@@ -218,10 +218,11 @@
 {
     ASSERT(context()->isGraphOwner());
 
-    for (ParamsIterator it = m_params.begin(); it != m_params.end(); ++it)
-        (*it)->disconnect(this);
-
-    m_params.clear();
+    // AudioParam::disconnect() changes m_params by calling removeParam().
+    while (!m_params.isEmpty()) {
+        AudioParam* param = m_params.begin()->get();
+        param->disconnect(this);
+    }
 }
 
 void AudioNodeOutput::disconnectAll()
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to