Index: Source/modules/webaudio/OfflineAudioContext.cpp |
diff --git a/Source/modules/webaudio/OfflineAudioContext.cpp b/Source/modules/webaudio/OfflineAudioContext.cpp |
index 832a57aed982813af53ac1a6141df488242c6c62..5a2860af5ae391a4e212f5be7ef128540a1e5334 100644 |
--- a/Source/modules/webaudio/OfflineAudioContext.cpp |
+++ b/Source/modules/webaudio/OfflineAudioContext.cpp |
@@ -48,6 +48,15 @@ PassRefPtr<OfflineAudioContext> OfflineAudioContext::create(ExecutionContext* co |
Document* document = toDocument(context); |
+ if (!numberOfFrames) { |
+ es.throwDOMException( |
+ SyntaxError, |
+ ExceptionMessages::failedToConstruct( |
+ "OfflineAudioContext", |
+ "number of frames cannot be zero.")); |
+ return 0; |
+ } |
+ |
if (numberOfChannels > 10) { |
es.throwDOMException( |
SyntaxError, |