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

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

Issue 27039002: Fix crash when the OfflineAudioContext constructor is given 0 as numberOfFrames (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 2 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/AudioContext.cpp
diff --git a/Source/modules/webaudio/AudioContext.cpp b/Source/modules/webaudio/AudioContext.cpp
index fb7d57ef55602524189f2cbec2740afddcc99c6b..18f3df70c123b647cef8ebce9c03949c378cb840 100644
--- a/Source/modules/webaudio/AudioContext.cpp
+++ b/Source/modules/webaudio/AudioContext.cpp
@@ -154,7 +154,9 @@ AudioContext::AudioContext(Document* document, unsigned numberOfChannels, size_t
// Create a new destination for offline rendering.
m_renderTarget = AudioBuffer::create(numberOfChannels, numberOfFrames, sampleRate);
+ ASSERT(m_renderTarget);
m_destinationNode = OfflineAudioDestinationNode::create(this, m_renderTarget.get());
+ ASSERT(m_destinationNode);
Raymond Toy (Google) 2013/10/11 20:04:40 Did these two asserts catch the crash? I'm just c
Inactive 2013/10/11 20:14:30 Yes, these assertions would have caught the crash.
}
void AudioContext::constructCommon()

Powered by Google App Engine
This is Rietveld 408576698