Bug 991533 - Revert rate/channels/length exception to old NOT_SUPPORTED_ERR. a=1.2.x+
authorKarl Tomlinson <karlt+@karlt.net>
Wed, 21 May 2014 17:34:13 -0400
changeset 157137 7a2645d90153d1bae99939b91d95f815597fd64d
parent 157136 d5f64dbd1400c190ad4336bc7fe2fcdcea4f4f8c
child 157138 8e771e2a273bd3ca25bf13ebbb3dbd844b70d487
push id510
push userryanvm@gmail.com
push dateWed, 21 May 2014 21:35:59 +0000
reviewers1.2.x
bugs991533
milestone26.0
Bug 991533 - Revert rate/channels/length exception to old NOT_SUPPORTED_ERR. a=1.2.x+ This exception was accidentally changed to DOM_INDEX_ERR in this bug.
content/media/webaudio/AudioBuffer.cpp
--- a/content/media/webaudio/AudioBuffer.cpp
+++ b/content/media/webaudio/AudioBuffer.cpp
@@ -70,17 +70,17 @@ AudioBuffer::Create(AudioContext* aConte
 {
   // Note that a buffer with zero channels is permitted here for the sake of
   // AudioProcessingEvent, where channel counts must match parameters passed
   // to createScriptProcessor(), one of which may be zero.
   if (aSampleRate < WebAudioUtils::MinSampleRate ||
       aSampleRate > WebAudioUtils::MaxSampleRate ||
       aNumberOfChannels > WebAudioUtils::MaxChannelCount ||
       !aLength || aLength > INT32_MAX) {
-    aRv.Throw(NS_ERROR_DOM_INDEX_SIZE_ERR);
+    aRv.Throw(NS_ERROR_DOM_NOT_SUPPORTED_ERR);
     return nullptr;
   }
 
   nsRefPtr<AudioBuffer> buffer =
     new AudioBuffer(aContext, aNumberOfChannels, aLength, aSampleRate);
 
   for (uint32_t i = 0; i < aNumberOfChannels; ++i) {
     JS::RootedObject array(aJSContext, JS_NewFloat32Array(aJSContext, aLength));