| Index: third_party/WebKit/Source/modules/webaudio/OfflineAudioContext.cpp
|
| diff --git a/third_party/WebKit/Source/modules/webaudio/OfflineAudioContext.cpp b/third_party/WebKit/Source/modules/webaudio/OfflineAudioContext.cpp
|
| index 37bb3022d4eb77deec92f6c0f3e487bedb692b24..48aa9aebe93bdd59b010c932dd8270e6decc3ddb 100644
|
| --- a/third_party/WebKit/Source/modules/webaudio/OfflineAudioContext.cpp
|
| +++ b/third_party/WebKit/Source/modules/webaudio/OfflineAudioContext.cpp
|
| @@ -66,22 +66,24 @@ OfflineAudioContext* OfflineAudioContext::create(
|
|
|
| if (numberOfChannels > BaseAudioContext::maxNumberOfChannels()) {
|
| exceptionState.throwDOMException(
|
| - IndexSizeError, ExceptionMessages::indexOutsideRange<unsigned>(
|
| - "number of channels", numberOfChannels, 0,
|
| - ExceptionMessages::InclusiveBound,
|
| - BaseAudioContext::maxNumberOfChannels(),
|
| - ExceptionMessages::InclusiveBound));
|
| + IndexSizeError,
|
| + ExceptionMessages::indexOutsideRange<unsigned>(
|
| + "number of channels", numberOfChannels, 0,
|
| + ExceptionMessages::InclusiveBound,
|
| + BaseAudioContext::maxNumberOfChannels(),
|
| + ExceptionMessages::InclusiveBound));
|
| return nullptr;
|
| }
|
|
|
| if (!AudioUtilities::isValidAudioBufferSampleRate(sampleRate)) {
|
| exceptionState.throwDOMException(
|
| - IndexSizeError, ExceptionMessages::indexOutsideRange(
|
| - "sampleRate", sampleRate,
|
| - AudioUtilities::minAudioBufferSampleRate(),
|
| - ExceptionMessages::InclusiveBound,
|
| - AudioUtilities::maxAudioBufferSampleRate(),
|
| - ExceptionMessages::InclusiveBound));
|
| + IndexSizeError,
|
| + ExceptionMessages::indexOutsideRange(
|
| + "sampleRate", sampleRate,
|
| + AudioUtilities::minAudioBufferSampleRate(),
|
| + ExceptionMessages::InclusiveBound,
|
| + AudioUtilities::maxAudioBufferSampleRate(),
|
| + ExceptionMessages::InclusiveBound));
|
| return nullptr;
|
| }
|
|
|
| @@ -90,10 +92,10 @@ OfflineAudioContext* OfflineAudioContext::create(
|
|
|
| if (!audioContext->destination()) {
|
| exceptionState.throwDOMException(
|
| - NotSupportedError, "OfflineAudioContext(" +
|
| - String::number(numberOfChannels) + ", " +
|
| - String::number(numberOfFrames) + ", " +
|
| - String::number(sampleRate) + ")");
|
| + NotSupportedError,
|
| + "OfflineAudioContext(" + String::number(numberOfChannels) + ", " +
|
| + String::number(numberOfFrames) + ", " + String::number(sampleRate) +
|
| + ")");
|
| }
|
|
|
| #if DEBUG_AUDIONODE_REFERENCES
|
| @@ -142,10 +144,11 @@ OfflineAudioContext::OfflineAudioContext(Document* document,
|
| initialize();
|
| } else {
|
| exceptionState.throwRangeError(ExceptionMessages::failedToConstruct(
|
| - "OfflineAudioContext", "failed to create OfflineAudioContext(" +
|
| - String::number(numberOfChannels) + ", " +
|
| - String::number(numberOfFrames) + ", " +
|
| - String::number(sampleRate) + ")"));
|
| + "OfflineAudioContext",
|
| + "failed to create OfflineAudioContext(" +
|
| + String::number(numberOfChannels) + ", " +
|
| + String::number(numberOfFrames) + ", " + String::number(sampleRate) +
|
| + ")"));
|
| }
|
| }
|
|
|
| @@ -248,9 +251,10 @@ ScriptPromise OfflineAudioContext::suspendContext(ScriptState* scriptState,
|
| resolver->reject(DOMException::create(
|
| InvalidStateError,
|
| "cannot schedule a suspend at frame " + String::number(frame) + " (" +
|
| - String::number(when) + " seconds) " + "because it is greater than "
|
| - "or equal to the total "
|
| - "render duration of " +
|
| + String::number(when) + " seconds) " +
|
| + "because it is greater than "
|
| + "or equal to the total "
|
| + "render duration of " +
|
| String::number(m_totalRenderFrames) + " frames"));
|
| return promise;
|
| }
|
| @@ -277,9 +281,9 @@ ScriptPromise OfflineAudioContext::suspendContext(ScriptState* scriptState,
|
| // reject the promise.
|
| if (m_scheduledSuspends.contains(frame)) {
|
| resolver->reject(DOMException::create(
|
| - InvalidStateError, "cannot schedule more than one suspend at frame " +
|
| - String::number(frame) + " (" +
|
| - String::number(when) + " seconds)"));
|
| + InvalidStateError,
|
| + "cannot schedule more than one suspend at frame " +
|
| + String::number(frame) + " (" + String::number(when) + " seconds)"));
|
| return promise;
|
| }
|
|
|
|
|