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

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: Fix nits 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);
}
void AudioContext::constructCommon()
« no previous file with comments | « LayoutTests/webaudio/offlineaudiocontext-constructor-expected.txt ('k') | Source/modules/webaudio/OfflineAudioContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698