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

Side by Side Diff: Source/modules/webaudio/DefaultAudioDestinationNode.cpp

Issue 24469004: Amusingly deprecate the generic version of 'ExceptionState::throwDOMException'. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/modules/webaudio/AudioNode.cpp ('k') | Source/modules/webaudio/DelayNode.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011, Google Inc. All rights reserved. 2 * Copyright (C) 2011, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 112
113 void DefaultAudioDestinationNode::setChannelCount(unsigned long channelCount, Ex ceptionState& es) 113 void DefaultAudioDestinationNode::setChannelCount(unsigned long channelCount, Ex ceptionState& es)
114 { 114 {
115 // The channelCount for the input to this node controls the actual number of channels we 115 // The channelCount for the input to this node controls the actual number of channels we
116 // send to the audio hardware. It can only be set depending on the maximum n umber of 116 // send to the audio hardware. It can only be set depending on the maximum n umber of
117 // channels supported by the hardware. 117 // channels supported by the hardware.
118 118
119 ASSERT(isMainThread()); 119 ASSERT(isMainThread());
120 120
121 if (!maxChannelCount() || channelCount > maxChannelCount()) { 121 if (!maxChannelCount() || channelCount > maxChannelCount()) {
122 es.throwDOMException(InvalidStateError); 122 es.throwUninformativeAndGenericDOMException(InvalidStateError);
123 return; 123 return;
124 } 124 }
125 125
126 unsigned long oldChannelCount = this->channelCount(); 126 unsigned long oldChannelCount = this->channelCount();
127 AudioNode::setChannelCount(channelCount, es); 127 AudioNode::setChannelCount(channelCount, es);
128 128
129 if (!es.hadException() && this->channelCount() != oldChannelCount && isIniti alized()) { 129 if (!es.hadException() && this->channelCount() != oldChannelCount && isIniti alized()) {
130 // Re-create destination. 130 // Re-create destination.
131 m_destination->stop(); 131 m_destination->stop();
132 createDestination(); 132 createDestination();
133 m_destination->start(); 133 m_destination->start();
134 } 134 }
135 } 135 }
136 136
137 } // namespace WebCore 137 } // namespace WebCore
138 138
139 #endif // ENABLE(WEB_AUDIO) 139 #endif // ENABLE(WEB_AUDIO)
OLDNEW
« no previous file with comments | « Source/modules/webaudio/AudioNode.cpp ('k') | Source/modules/webaudio/DelayNode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698