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

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

Issue 72363002: Rename es => exceptionState in other than bindings/ (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Retry Created 7 years, 1 month 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/AudioBuffer.cpp ('k') | Source/modules/webaudio/AudioContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/webaudio/AudioBufferSourceNode.cpp
diff --git a/Source/modules/webaudio/AudioBufferSourceNode.cpp b/Source/modules/webaudio/AudioBufferSourceNode.cpp
index d240ed4f44c8ff760715efa4ea8b64e89b107e09..eaa7fe8ed57e17b2262c00761f5a0bd4c879fdcb 100644
--- a/Source/modules/webaudio/AudioBufferSourceNode.cpp
+++ b/Source/modules/webaudio/AudioBufferSourceNode.cpp
@@ -338,13 +338,13 @@ void AudioBufferSourceNode::reset()
m_lastGain = gain()->value();
}
-void AudioBufferSourceNode::setBuffer(AudioBuffer* buffer, ExceptionState& es)
+void AudioBufferSourceNode::setBuffer(AudioBuffer* buffer, ExceptionState& exceptionState)
{
ASSERT(isMainThread());
// FIXME: It does not look like we should throw if the buffer is null as
// the attribute is nullable in the specification.
if (!buffer) {
- es.throwTypeError("buffer cannot be null");
+ exceptionState.throwTypeError("buffer cannot be null");
return;
}
@@ -359,7 +359,7 @@ void AudioBufferSourceNode::setBuffer(AudioBuffer* buffer, ExceptionState& es)
unsigned numberOfChannels = buffer->numberOfChannels();
if (numberOfChannels > AudioContext::maxNumberOfChannels()) {
- es.throwTypeError("number of input channels (" + String::number(numberOfChannels)
+ exceptionState.throwTypeError("number of input channels (" + String::number(numberOfChannels)
+ ") exceeds maximum ("
+ String::number(AudioContext::maxNumberOfChannels()) + ").");
return;
@@ -383,32 +383,32 @@ unsigned AudioBufferSourceNode::numberOfChannels()
return output(0)->numberOfChannels();
}
-void AudioBufferSourceNode::start(ExceptionState& es)
+void AudioBufferSourceNode::start(ExceptionState& exceptionState)
{
- startPlaying(false, 0, 0, buffer() ? buffer()->duration() : 0, es);
+ startPlaying(false, 0, 0, buffer() ? buffer()->duration() : 0, exceptionState);
}
-void AudioBufferSourceNode::start(double when, ExceptionState& es)
+void AudioBufferSourceNode::start(double when, ExceptionState& exceptionState)
{
- startPlaying(false, when, 0, buffer() ? buffer()->duration() : 0, es);
+ startPlaying(false, when, 0, buffer() ? buffer()->duration() : 0, exceptionState);
}
-void AudioBufferSourceNode::start(double when, double grainOffset, ExceptionState& es)
+void AudioBufferSourceNode::start(double when, double grainOffset, ExceptionState& exceptionState)
{
- startPlaying(true, when, grainOffset, buffer() ? buffer()->duration() : 0, es);
+ startPlaying(true, when, grainOffset, buffer() ? buffer()->duration() : 0, exceptionState);
}
-void AudioBufferSourceNode::start(double when, double grainOffset, double grainDuration, ExceptionState& es)
+void AudioBufferSourceNode::start(double when, double grainOffset, double grainDuration, ExceptionState& exceptionState)
{
- startPlaying(true, when, grainOffset, grainDuration, es);
+ startPlaying(true, when, grainOffset, grainDuration, exceptionState);
}
-void AudioBufferSourceNode::startPlaying(bool isGrain, double when, double grainOffset, double grainDuration, ExceptionState& es)
+void AudioBufferSourceNode::startPlaying(bool isGrain, double when, double grainOffset, double grainDuration, ExceptionState& exceptionState)
{
ASSERT(isMainThread());
if (m_playbackState != UNSCHEDULED_STATE) {
- es.throwDOMException(
+ exceptionState.throwDOMException(
InvalidStateError,
ExceptionMessages::failedToExecute(
"start",
@@ -447,12 +447,12 @@ void AudioBufferSourceNode::startPlaying(bool isGrain, double when, double grain
m_playbackState = SCHEDULED_STATE;
}
-void AudioBufferSourceNode::noteGrainOn(double when, double grainOffset, double grainDuration, ExceptionState& es)
+void AudioBufferSourceNode::noteGrainOn(double when, double grainOffset, double grainDuration, ExceptionState& exceptionState)
{
// Handle unspecified duration where 0 means the rest of the buffer.
if (!grainDuration && buffer())
grainDuration = buffer()->duration();
- startPlaying(true, when, grainOffset, grainDuration, es);
+ startPlaying(true, when, grainOffset, grainDuration, exceptionState);
}
double AudioBufferSourceNode::totalPitchRate()
« no previous file with comments | « Source/modules/webaudio/AudioBuffer.cpp ('k') | Source/modules/webaudio/AudioContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698