WebAudio should use Logging instead of printf.
Created attachment 118828 [details] Patch
Created attachment 118897 [details] Patch Rebased patch against ToT.
Comment on attachment 118897 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=118897&action=review > Source/WebCore/webaudio/AudioContext.cpp:184 > #if DEBUG_AUDIONODE_REFERENCES > - printf("%p: AudioContext::~AudioContext()\n", this); > + LOG(WebAudio, "%p: AudioContext::~AudioContext()\n", this); > #endif If this is only for debugging, I don't think you should use printf. > Source/WebCore/webaudio/AudioNode.cpp:314 > void AudioNode::printNodeCounts() Who calls this? If it is only for debugging (from a debugger) I think printf is probably more idiomatic. > Source/WebCore/webaudio/DefaultAudioDestinationNode.cpp:54 > #ifndef NDEBUG > - fprintf(stderr, ">>>> hardwareSampleRate = %f\n", hardwareSampleRate); > + LOG(WebAudio, ">>>> hardwareSampleRate = %f\n", hardwareSampleRate); > #endif This #ifndef is no longer needed.
(In reply to comment #3) > (From update of attachment 118897 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=118897&action=review > > > Source/WebCore/webaudio/AudioContext.cpp:184 > > #if DEBUG_AUDIONODE_REFERENCES > > - printf("%p: AudioContext::~AudioContext()\n", this); > > + LOG(WebAudio, "%p: AudioContext::~AudioContext()\n", this); > > #endif > > If this is only for debugging, I don't think you should use printf. Do you mean, "I don't think you should use LOG", or "I [do] think you should use printf"? > > Source/WebCore/webaudio/AudioNode.cpp:314 > > void AudioNode::printNodeCounts() > > Who calls this? If it is only for debugging (from a debugger) I think printf is probably more idiomatic. This is called by the AudioNode constructor, provided DEBUG_AUDIONODE_REFERENCES is enabled. > > Source/WebCore/webaudio/DefaultAudioDestinationNode.cpp:54 > > #ifndef NDEBUG > > - fprintf(stderr, ">>>> hardwareSampleRate = %f\n", hardwareSampleRate); > > + LOG(WebAudio, ">>>> hardwareSampleRate = %f\n", hardwareSampleRate); > > #endif > > This #ifndef is no longer needed. I'll delete it.
Created attachment 118918 [details] Patch
Committed r104857: <http://trac.webkit.org/changeset/104857>