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

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

Issue 18548003: Rename ExceptionCode constants to use the names in the spec (2/3) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 6 months 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/AudioContext.cpp ('k') | Source/modules/webaudio/DefaultAudioDestinationNode.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/webaudio/AudioNode.cpp
diff --git a/Source/modules/webaudio/AudioNode.cpp b/Source/modules/webaudio/AudioNode.cpp
index 24c39df7128dd3009c087c7361b9471f1df6935f..460f772b2dc4da80004cff2e07dced8e3e2d9c9b 100644
--- a/Source/modules/webaudio/AudioNode.cpp
+++ b/Source/modules/webaudio/AudioNode.cpp
@@ -131,7 +131,7 @@ void AudioNode::connect(AudioNode* destination, unsigned outputIndex, unsigned i
AudioContext::AutoLocker locker(context());
if (!destination) {
- ec = SYNTAX_ERR;
+ ec = SyntaxError;
return;
}
@@ -147,7 +147,7 @@ void AudioNode::connect(AudioNode* destination, unsigned outputIndex, unsigned i
}
if (context() != destination->context()) {
- ec = SYNTAX_ERR;
+ ec = SyntaxError;
return;
}
@@ -165,7 +165,7 @@ void AudioNode::connect(AudioParam* param, unsigned outputIndex, ExceptionCode&
AudioContext::AutoLocker locker(context());
if (!param) {
- ec = SYNTAX_ERR;
+ ec = SyntaxError;
return;
}
@@ -175,7 +175,7 @@ void AudioNode::connect(AudioParam* param, unsigned outputIndex, ExceptionCode&
}
if (context() != param->context()) {
- ec = SYNTAX_ERR;
+ ec = SyntaxError;
return;
}
@@ -214,8 +214,9 @@ void AudioNode::setChannelCount(unsigned long channelCount, ExceptionCode& ec)
if (m_channelCountMode != Max)
updateChannelsForInputs();
}
- } else
- ec = INVALID_STATE_ERR;
+ } else {
+ ec = InvalidStateError;
+ }
}
String AudioNode::channelCountMode()
@@ -246,7 +247,7 @@ void AudioNode::setChannelCountMode(const String& mode, ExceptionCode& ec)
else if (mode == "explicit")
m_channelCountMode = Explicit;
else
- ec = INVALID_STATE_ERR;
+ ec = InvalidStateError;
if (m_channelCountMode != oldMode)
updateChannelsForInputs();
@@ -274,7 +275,7 @@ void AudioNode::setChannelInterpretation(const String& interpretation, Exception
else if (interpretation == "discrete")
m_channelInterpretation = AudioBus::Discrete;
else
- ec = INVALID_STATE_ERR;
+ ec = InvalidStateError;
}
void AudioNode::updateChannelsForInputs()
« no previous file with comments | « Source/modules/webaudio/AudioContext.cpp ('k') | Source/modules/webaudio/DefaultAudioDestinationNode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698