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

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

Issue 558523002: AudioNodeOutput::enable() and AudioNodeOutput::disable() should not be reentered (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 | « no previous file | no next file » | 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) 2010, Google Inc. All rights reserved. 2 * Copyright (C) 2010, 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 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 { 215 {
216 disconnectAllInputs(); 216 disconnectAllInputs();
217 disconnectAllParams(); 217 disconnectAllParams();
218 } 218 }
219 219
220 void AudioNodeOutput::disable() 220 void AudioNodeOutput::disable()
221 { 221 {
222 ASSERT(context()->isGraphOwner()); 222 ASSERT(context()->isGraphOwner());
223 223
224 if (m_isEnabled) { 224 if (m_isEnabled) {
225 m_isEnabled = false;
225 for (InputsIterator i = m_inputs.begin(); i != m_inputs.end(); ++i) 226 for (InputsIterator i = m_inputs.begin(); i != m_inputs.end(); ++i)
226 i->key->disable(*this); 227 i->key->disable(*this);
227 m_isEnabled = false;
228 } 228 }
229 } 229 }
230 230
231 void AudioNodeOutput::enable() 231 void AudioNodeOutput::enable()
232 { 232 {
233 ASSERT(context()->isGraphOwner()); 233 ASSERT(context()->isGraphOwner());
234 234
235 if (!m_isEnabled) { 235 if (!m_isEnabled) {
236 m_isEnabled = true;
236 for (InputsIterator i = m_inputs.begin(); i != m_inputs.end(); ++i) 237 for (InputsIterator i = m_inputs.begin(); i != m_inputs.end(); ++i)
237 i->key->enable(*this); 238 i->key->enable(*this);
238 m_isEnabled = true;
239 } 239 }
240 } 240 }
241 241
242 } // namespace blink 242 } // namespace blink
243 243
244 #endif // ENABLE(WEB_AUDIO) 244 #endif // ENABLE(WEB_AUDIO)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698