Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2110)

Unified Diff: Source/modules/webaudio/OfflineAudioContext.cpp

Issue 111373003: Migrate bindings constructors to the new ExceptionState model. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Ugh. Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/modules/webaudio/DelayNode.cpp ('k') | Source/web/SharedWorkerRepositoryClientImpl.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/webaudio/OfflineAudioContext.cpp
diff --git a/Source/modules/webaudio/OfflineAudioContext.cpp b/Source/modules/webaudio/OfflineAudioContext.cpp
index 621d50432b31e0f28b90b88a69afafb965324d34..4cf7947dfe1ecd0ab3cfd1df7fbffb3a38af23f3 100644
--- a/Source/modules/webaudio/OfflineAudioContext.cpp
+++ b/Source/modules/webaudio/OfflineAudioContext.cpp
@@ -42,36 +42,24 @@ PassRefPtr<OfflineAudioContext> OfflineAudioContext::create(ExecutionContext* co
if (!context || !context->isDocument()) {
exceptionState.throwDOMException(
NotSupportedError,
- ExceptionMessages::failedToConstruct("OfflineAudioContext"));
+ "Workers are not supported.");
return 0;
}
Document* document = toDocument(context);
if (!numberOfFrames) {
- exceptionState.throwDOMException(
- SyntaxError,
- ExceptionMessages::failedToConstruct(
- "OfflineAudioContext",
- "number of frames cannot be zero."));
+ exceptionState.throwDOMException(SyntaxError, "number of frames cannot be zero.");
return 0;
}
if (numberOfChannels > 10) {
- exceptionState.throwDOMException(
- SyntaxError,
- ExceptionMessages::failedToConstruct(
- "OfflineAudioContext",
- "number of channels (" + String::number(numberOfChannels) + ") exceeds maximum (10)."));
+ exceptionState.throwDOMException(SyntaxError, "number of channels (" + String::number(numberOfChannels) + ") exceeds maximum (10).");
return 0;
}
if (!isSampleRateRangeGood(sampleRate)) {
- exceptionState.throwDOMException(
- SyntaxError,
- ExceptionMessages::failedToConstruct(
- "OfflineAudioContext",
- "sample rate (" + String::number(sampleRate) + ") must be in the range 44100-96000 Hz."));
+ exceptionState.throwDOMException(SyntaxError, "sample rate (" + String::number(sampleRate) + ") must be in the range 44100-96000 Hz.");
return 0;
}
« no previous file with comments | « Source/modules/webaudio/DelayNode.cpp ('k') | Source/web/SharedWorkerRepositoryClientImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698