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

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

Issue 386343004: WebAudio: Use references instead of pointers in AudioNodeInput and AudioNodeOutput. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/modules/webaudio/AudioNodeOutput.cpp ('k') | 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 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 { 168 {
169 ASSERT(context()->isGraphOwner()); 169 ASSERT(context()->isGraphOwner());
170 170
171 ASSERT(output); 171 ASSERT(output);
172 if (!output) 172 if (!output)
173 return; 173 return;
174 174
175 if (m_outputs.contains(output)) 175 if (m_outputs.contains(output))
176 return; 176 return;
177 177
178 output->addParam(this); 178 output->addParam(*this);
179 m_outputs.add(output); 179 m_outputs.add(output);
180 changedOutputs(); 180 changedOutputs();
181 } 181 }
182 182
183 void AudioParam::disconnect(AudioNodeOutput* output) 183 void AudioParam::disconnect(AudioNodeOutput* output)
184 { 184 {
185 ASSERT(context()->isGraphOwner()); 185 ASSERT(context()->isGraphOwner());
186 186
187 ASSERT(output); 187 ASSERT(output);
188 if (!output) 188 if (!output)
189 return; 189 return;
190 190
191 if (m_outputs.contains(output)) { 191 if (m_outputs.contains(output)) {
192 m_outputs.remove(output); 192 m_outputs.remove(output);
193 changedOutputs(); 193 changedOutputs();
194 output->removeParam(this); 194 output->removeParam(*this);
195 } 195 }
196 } 196 }
197 197
198 } // namespace WebCore 198 } // namespace WebCore
199 199
200 #endif // ENABLE(WEB_AUDIO) 200 #endif // ENABLE(WEB_AUDIO)
OLDNEW
« no previous file with comments | « Source/modules/webaudio/AudioNodeOutput.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698