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

Side by Side Diff: third_party/WebKit/Source/modules/webaudio/AudioNode.cpp

Issue 1816283002: Fix compile errors when DEBUG_AUDIONODE_REFERENCES is set. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
« 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 InstanceCounters::incrementCounter(InstanceCounters::AudioHandlerCounter); 65 InstanceCounters::incrementCounter(InstanceCounters::AudioHandlerCounter);
66 } 66 }
67 67
68 AudioHandler::~AudioHandler() 68 AudioHandler::~AudioHandler()
69 { 69 {
70 ASSERT(isMainThread()); 70 ASSERT(isMainThread());
71 // dispose() should be called. 71 // dispose() should be called.
72 ASSERT(!node()); 72 ASSERT(!node());
73 InstanceCounters::decrementCounter(InstanceCounters::AudioHandlerCounter); 73 InstanceCounters::decrementCounter(InstanceCounters::AudioHandlerCounter);
74 #if DEBUG_AUDIONODE_REFERENCES 74 #if DEBUG_AUDIONODE_REFERENCES
75 --s_nodeCount[nodeType()]; 75 --s_nodeCount[getNodeType()];
76 fprintf(stderr, "%p: %2d: AudioNode::~AudioNode() %d [%d]\n", 76 fprintf(stderr, "%p: %2d: AudioNode::~AudioNode() %d [%d]\n",
77 this, nodeType(), m_connectionRefCount, s_nodeCount[nodeType()]); 77 this, getNodeType(), m_connectionRefCount, s_nodeCount[getNodeType()]);
78 #endif 78 #endif
79 } 79 }
80 80
81 void AudioHandler::initialize() 81 void AudioHandler::initialize()
82 { 82 {
83 m_isInitialized = true; 83 m_isInitialized = true;
84 } 84 }
85 85
86 void AudioHandler::uninitialize() 86 void AudioHandler::uninitialize()
87 { 87 {
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 // Don't allow the node type to be changed to a different node type, after i t's already been 167 // Don't allow the node type to be changed to a different node type, after i t's already been
168 // set! And the new type can't be unknown or end! 168 // set! And the new type can't be unknown or end!
169 ASSERT(m_nodeType == NodeTypeUnknown); 169 ASSERT(m_nodeType == NodeTypeUnknown);
170 ASSERT(type != NodeTypeUnknown); 170 ASSERT(type != NodeTypeUnknown);
171 ASSERT(type != NodeTypeEnd); 171 ASSERT(type != NodeTypeEnd);
172 172
173 m_nodeType = type; 173 m_nodeType = type;
174 174
175 #if DEBUG_AUDIONODE_REFERENCES 175 #if DEBUG_AUDIONODE_REFERENCES
176 ++s_nodeCount[type]; 176 ++s_nodeCount[type];
177 fprintf(stderr, "%p: %2d: AudioNode::AudioNode [%3d]\n", this, nodeType(), s _nodeCount[nodeType()]); 177 fprintf(stderr, "%p: %2d: AudioNode::AudioNode [%3d]\n", this, getNodeType() , s_nodeCount[getNodeType()]);
178 #endif 178 #endif
179 } 179 }
180 180
181 void AudioHandler::addInput() 181 void AudioHandler::addInput()
182 { 182 {
183 m_inputs.append(AudioNodeInput::create(*this)); 183 m_inputs.append(AudioNodeInput::create(*this));
184 } 184 }
185 185
186 void AudioHandler::addOutput(unsigned numberOfChannels) 186 void AudioHandler::addOutput(unsigned numberOfChannels)
187 { 187 {
(...skipping 746 matching lines...) Expand 10 before | Expand all | Expand 10 after
934 void AudioNode::didAddOutput(unsigned numberOfOutputs) 934 void AudioNode::didAddOutput(unsigned numberOfOutputs)
935 { 935 {
936 m_connectedNodes.append(nullptr); 936 m_connectedNodes.append(nullptr);
937 ASSERT_UNUSED(numberOfOutputs, numberOfOutputs == m_connectedNodes.size()); 937 ASSERT_UNUSED(numberOfOutputs, numberOfOutputs == m_connectedNodes.size());
938 m_connectedParams.append(nullptr); 938 m_connectedParams.append(nullptr);
939 ASSERT_UNUSED(numberOfOutputs, numberOfOutputs == m_connectedParams.size()); 939 ASSERT_UNUSED(numberOfOutputs, numberOfOutputs == m_connectedParams.size());
940 } 940 }
941 941
942 } // namespace blink 942 } // namespace blink
943 943
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