Title: [145456] branches/chromium/1410/Source/WebCore/Modules/webaudio
Revision
145456
Author
cev...@google.com
Date
2013-03-11 18:25:33 -0700 (Mon, 11 Mar 2013)

Log Message

Merge 144417
BUG=172342
Review URL: https://codereview.chromium.org/12543030

Modified Paths

Diff

Modified: branches/chromium/1410/Source/WebCore/Modules/webaudio/AudioNodeInput.cpp (145455 => 145456)


--- branches/chromium/1410/Source/WebCore/Modules/webaudio/AudioNodeInput.cpp	2013-03-12 01:19:39 UTC (rev 145455)
+++ branches/chromium/1410/Source/WebCore/Modules/webaudio/AudioNodeInput.cpp	2013-03-12 01:25:33 UTC (rev 145456)
@@ -154,7 +154,9 @@
 
     for (HashSet<AudioNodeOutput*>::iterator i = m_outputs.begin(); i != m_outputs.end(); ++i) {
         AudioNodeOutput* output = *i;
-        maxChannels = max(maxChannels, output->bus()->numberOfChannels());
+        // Use output()->numberOfChannels() instead of output->bus()->numberOfChannels(),
+        // because the calling of AudioNodeOutput::bus() is not safe here.
+        maxChannels = max(maxChannels, output->numberOfChannels());
     }
     
     return maxChannels;

Modified: branches/chromium/1410/Source/WebCore/Modules/webaudio/AudioNodeOutput.cpp (145455 => 145456)


--- branches/chromium/1410/Source/WebCore/Modules/webaudio/AudioNodeOutput.cpp	2013-03-12 01:19:39 UTC (rev 145455)
+++ branches/chromium/1410/Source/WebCore/Modules/webaudio/AudioNodeOutput.cpp	2013-03-12 01:25:33 UTC (rev 145456)
@@ -132,6 +132,8 @@
 
 AudioBus* AudioNodeOutput::bus() const
 {
+    // FIXME: Add ASSERTs/checkings to restrict the calling of bus(), because the calling is 
+    // only safe after setting the in-place bus in pull() and before updating the referred bus.
     ASSERT(const_cast<AudioNodeOutput*>(this)->context()->isAudioThread());
     ASSERT(m_actualDestinationBus);
     return m_actualDestinationBus;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to