WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
74322
WebAudio: Use Logging instead of printf.
https://bugs.webkit.org/show_bug.cgi?id=74322
Summary
WebAudio: Use Logging instead of printf.
Jer Noble
Reported
2011-12-12 12:59:12 PST
WebAudio should use Logging instead of printf.
Attachments
Patch
(8.92 KB, patch)
2011-12-12 13:03 PST
,
Jer Noble
no flags
Details
Formatted Diff
Diff
Patch
(8.91 KB, patch)
2011-12-12 15:57 PST
,
Jer Noble
no flags
Details
Formatted Diff
Diff
Patch
(5.21 KB, patch)
2011-12-12 17:20 PST
,
Jer Noble
darin
: review+
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Jer Noble
Comment 1
2011-12-12 13:03:03 PST
Created
attachment 118828
[details]
Patch
Jer Noble
Comment 2
2011-12-12 15:57:47 PST
Created
attachment 118897
[details]
Patch Rebased patch against ToT.
Sam Weinig
Comment 3
2011-12-12 16:45:56 PST
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.
Jer Noble
Comment 4
2011-12-12 17:01:00 PST
(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.
Jer Noble
Comment 5
2011-12-12 17:20:12 PST
Created
attachment 118918
[details]
Patch
Jer Noble
Comment 6
2012-01-12 14:12:06 PST
Committed
r104857
: <
http://trac.webkit.org/changeset/104857
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug