Passing invalid values to OfflineAudioContext's constructor should not crash.
https://bugs.webkit.org/show_bug.cgi?id=141197
Reviewed by Darin Adler.
Source/WebCore:
Test: webaudio/offlineaudiocontext-constructor.html
Throw a SYNTAX_ERR exception if passed in a zero for channelCount or numberOfSamples. This avoids
a crash where OfflineAudioDestinationNode is passed a null renderTarget.
* Modules/webaudio/OfflineAudioContext.cpp:
(WebCore::OfflineAudioContext::create):
LayoutTests:
* webaudio/offlineaudiocontext-constructor-expected.txt: Added.
* webaudio/offlineaudiocontext-constructor.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179565
268f45cc-cd09-0410-ab3c-
d52691b4dbfc