Chromium Code Reviews| Index: Source/modules/webaudio/OfflineAudioContext.cpp |
| diff --git a/Source/modules/webaudio/OfflineAudioContext.cpp b/Source/modules/webaudio/OfflineAudioContext.cpp |
| index 868b8c454585576f651bfabd59f78ad1aabec943..47d854083d0fc359509bd247d0df9b7b26ee2273 100644 |
| --- a/Source/modules/webaudio/OfflineAudioContext.cpp |
| +++ b/Source/modules/webaudio/OfflineAudioContext.cpp |
| @@ -67,8 +67,9 @@ OfflineAudioContext* OfflineAudioContext::create(ExecutionContext* context, unsi |
| } |
| if (!isSampleRateRangeGood(sampleRate)) { |
| - exceptionState.throwDOMException(SyntaxError, "sample rate (" + String::number(sampleRate) + ") must be in the range 44100-96000 Hz."); |
| - return 0; |
| + exceptionState.throwDOMException(IndexSizeError, ExceptionMessages::indexOutsideRange( |
| + "sampleRate", sampleRate, 3000.f, ExceptionMessages::InclusiveBound, 192000.f, ExceptionMessages::InclusiveBound)); |
|
Raymond Toy
2014/09/04 17:27:20
Is the .f required here? I don't think it's import
KhNo
2014/09/05 05:03:25
There is compile error.
../../third_party/WebKit/S
Raymond Toy
2014/09/05 05:10:31
Oh, sorry about that! I think you should either us
KhNo
2014/09/05 05:32:39
No problem.
|
| + return nullptr; |
| } |
| OfflineAudioContext* audioContext = adoptRefCountedGarbageCollectedWillBeNoop(new OfflineAudioContext(document, numberOfChannels, numberOfFrames, sampleRate)); |