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

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

Issue 19724003: Revert "Transition modules/** to use ExceptionState" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 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/DefaultAudioDestinationNode.h ('k') | Source/modules/webaudio/DelayNode.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/webaudio/DefaultAudioDestinationNode.cpp
diff --git a/Source/modules/webaudio/DefaultAudioDestinationNode.cpp b/Source/modules/webaudio/DefaultAudioDestinationNode.cpp
index 615d1007ff08e805f432491df10c3208457b0daf..26e769a1614e0db5a62e19843c771617fc65e63d 100644
--- a/Source/modules/webaudio/DefaultAudioDestinationNode.cpp
+++ b/Source/modules/webaudio/DefaultAudioDestinationNode.cpp
@@ -28,7 +28,6 @@
#include "modules/webaudio/DefaultAudioDestinationNode.h"
-#include "bindings/v8/ExceptionState.h"
#include "core/dom/ExceptionCode.h"
#include "core/platform/Logging.h"
#include "wtf/MainThread.h"
@@ -110,7 +109,7 @@ unsigned long DefaultAudioDestinationNode::maxChannelCount() const
return AudioDestination::maxChannelCount();
}
-void DefaultAudioDestinationNode::setChannelCount(unsigned long channelCount, ExceptionState& es)
+void DefaultAudioDestinationNode::setChannelCount(unsigned long channelCount, ExceptionCode& ec)
{
// The channelCount for the input to this node controls the actual number of channels we
// send to the audio hardware. It can only be set depending on the maximum number of
@@ -119,14 +118,14 @@ void DefaultAudioDestinationNode::setChannelCount(unsigned long channelCount, Ex
ASSERT(isMainThread());
if (!maxChannelCount() || channelCount > maxChannelCount()) {
- es.throwDOMException(InvalidStateError);
+ ec = InvalidStateError;
return;
}
unsigned long oldChannelCount = this->channelCount();
- AudioNode::setChannelCount(channelCount, es);
+ AudioNode::setChannelCount(channelCount, ec);
- if (!es.hadException() && this->channelCount() != oldChannelCount && isInitialized()) {
+ if (!ec && this->channelCount() != oldChannelCount && isInitialized()) {
// Re-create destination.
m_destination->stop();
createDestination();
« no previous file with comments | « Source/modules/webaudio/DefaultAudioDestinationNode.h ('k') | Source/modules/webaudio/DelayNode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698