Bug 87904

Summary: Remove RefInfo class
Product: WebKit Reporter: Raymond Toy <rtoy>
Component: New BugsAssignee: Raymond Toy <rtoy>
Status: RESOLVED FIXED    
Severity: Normal CC: crogers, dglazkov, eric.carlson, feature-media-reviews, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 77224    
Attachments:
Description Flags
Patch
none
Archive of layout-test-results from ec2-cr-linux-01
none
Patch
none
Patch none

Raymond Toy
Reported 2012-05-30 15:36:23 PDT
Remove RefInfo class
Attachments
Patch (8.03 KB, patch)
2012-05-30 15:45 PDT, Raymond Toy
no flags
Archive of layout-test-results from ec2-cr-linux-01 (746.33 KB, application/zip)
2012-05-31 01:58 PDT, WebKit Review Bot
no flags
Patch (9.29 KB, patch)
2012-05-31 13:39 PDT, Raymond Toy
no flags
Patch (9.30 KB, patch)
2012-06-01 09:30 PDT, Raymond Toy
no flags
Raymond Toy
Comment 1 2012-05-30 15:45:39 PDT
Build Bot
Comment 2 2012-05-30 16:09:20 PDT
Chris Rogers
Comment 3 2012-05-30 16:26:47 PDT
Comment on attachment 144943 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=144943&action=review > Source/WebCore/Modules/webaudio/AudioContext.cpp:556 > +} I don't understand why this method is needed? Why can't you simply make AudioScheduledSourceNode::finish() be virtual, then override in AudioBufferSourceNode and call AudioBufferSourceNode::clearPannerNode() there? > Source/WebCore/Modules/webaudio/AudioContext.cpp:673 > void AudioContext::addDeferredFinishDeref(AudioNode* node, AudioNode::RefType refType) Why do we still pass in the refType argument if it's no longer needed?
Raymond Toy
Comment 4 2012-05-30 16:50:53 PDT
Comment on attachment 144943 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=144943&action=review >> Source/WebCore/Modules/webaudio/AudioContext.cpp:556 >> +} > > I don't understand why this method is needed? > > Why can't you simply make AudioScheduledSourceNode::finish() be virtual, then override in AudioBufferSourceNode and call AudioBufferSourceNode::clearPannerNode() there? Unfinished source nodes still need to clear the panner. The virtual finish() method would work for other cases, though. > Source/WebCore/Modules/webaudio/AudioContext.cpp:673 > void AudioContext::addDeferredFinishDeref(AudioNode* node, AudioNode::RefType refType) My mistake.
Chris Rogers
Comment 5 2012-05-30 17:15:49 PDT
(In reply to comment #4) > (From update of attachment 144943 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=144943&action=review > > >> Source/WebCore/Modules/webaudio/AudioContext.cpp:556 > >> +} > > > > I don't understand why this method is needed? > > > > Why can't you simply make AudioScheduledSourceNode::finish() be virtual, then override in AudioBufferSourceNode and call AudioBufferSourceNode::clearPannerNode() there? > > Unfinished source nodes still need to clear the panner. The virtual finish() method would work for other cases, though. I don't understand -- isn't it exactly the right place to call clearPannerNode() in the finish() method? Why go to the trouble of doing it later on and adding more complex code in AudioContext? > > > Source/WebCore/Modules/webaudio/AudioContext.cpp:673 > > void AudioContext::addDeferredFinishDeref(AudioNode* node, AudioNode::RefType refType) > > My mistake.
WebKit Review Bot
Comment 6 2012-05-31 01:58:54 PDT
Comment on attachment 144943 [details] Patch Attachment 144943 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/12866148 New failing tests: webaudio/oscillator-square.html webaudio/mixing.html webaudio/javascriptaudionode-upmix2-8channel-input.html webaudio/javascriptaudionode.html webaudio/panner-equalpower-stereo.html webaudio/oscillator-sawtooth.html
WebKit Review Bot
Comment 7 2012-05-31 01:58:58 PDT
Created attachment 145019 [details] Archive of layout-test-results from ec2-cr-linux-01 The attached test failures were seen while running run-webkit-tests on the chromium-ews. Bot: ec2-cr-linux-01 Port: <class 'webkitpy.common.config.ports.ChromiumXVFBPort'> Platform: Linux-2.6.35-28-virtual-x86_64-with-Ubuntu-10.10-maverick
Raymond Toy
Comment 8 2012-05-31 13:39:52 PDT
Chris Rogers
Comment 9 2012-05-31 17:39:13 PDT
Comment on attachment 145148 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=145148&action=review > Source/WebCore/Modules/webaudio/AudioBufferSourceNode.cpp:470 > + } It's bad practice to simply copy/paste identical code from AudioScheduledSourceNode::finish(). It's not only less concise, but is also fragile since a bug fix or change in one part of the code could easily be missed by not changing the other part. Instead, simply call clearPannerNode() followed by: AudioScheduledSourceNode::finish() > Source/WebCore/Modules/webaudio/AudioBufferSourceNode.h:88 > + // Called when we have no more sound to play or the noteOff() time has been reached. Best not to copy/paste this comment from AudioScheduledSourceNode. Instead it's better to simply comment this as: // AudioScheduledSourceNode. > Source/WebCore/Modules/webaudio/AudioBufferSourceNode.h:89 > + virtual void finish(); Please use OVERRIDE keyword here. > Source/WebCore/Modules/webaudio/AudioBufferSourceNode.h:-127 > - RefPtr<AudioPannerNode> m_pannerNode; Please add a short comment here describing why we don't use RefPtr -- something like: // We manually manage ref-counting, since we use RefTypeConnection.
Raymond Toy
Comment 10 2012-06-01 09:30:32 PDT
Raymond Toy
Comment 11 2012-06-01 09:31:51 PDT
Comment on attachment 145148 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=145148&action=review >> Source/WebCore/Modules/webaudio/AudioBufferSourceNode.cpp:470 >> + } > > It's bad practice to simply copy/paste identical code from AudioScheduledSourceNode::finish(). It's not only less concise, but is also fragile since a bug fix or change in one part of the code could easily be missed by not changing the other part. > > Instead, simply call clearPannerNode() followed by: > > AudioScheduledSourceNode::finish() Fixed. >> Source/WebCore/Modules/webaudio/AudioBufferSourceNode.h:88 >> + // Called when we have no more sound to play or the noteOff() time has been reached. > > Best not to copy/paste this comment from AudioScheduledSourceNode. Instead it's better to simply comment this as: > > // AudioScheduledSourceNode. Fixed. >> Source/WebCore/Modules/webaudio/AudioBufferSourceNode.h:89 >> + virtual void finish(); > > Please use OVERRIDE keyword here. Fixed. >> Source/WebCore/Modules/webaudio/AudioBufferSourceNode.h:-127 >> - RefPtr<AudioPannerNode> m_pannerNode; > > Please add a short comment here describing why we don't use RefPtr -- something like: > > // We manually manage ref-counting, since we use RefTypeConnection. Added comment.
Chris Rogers
Comment 12 2012-06-01 10:26:26 PDT
Comment on attachment 145327 [details] Patch Thanks
Raymond Toy
Comment 13 2012-06-01 10:30:43 PDT
Comment on attachment 145327 [details] Patch Thank you.
WebKit Review Bot
Comment 14 2012-06-01 10:31:10 PDT
Comment on attachment 145327 [details] Patch Rejecting attachment 145327 [details] from commit-queue. rtoy@chromium.org does not have committer permissions according to http://trac.webkit.org/browser/trunk/Tools/Scripts/webkitpy/common/config/committers.py. - If you do not have committer rights please read http://webkit.org/coding/contributing.html for instructions on how to use bugzilla flags. - If you have committer rights please correct the error in Tools/Scripts/webkitpy/common/config/committers.py by adding yourself to the file (no review needed). The commit-queue restarts itself every 2 hours. After restart the commit-queue will correctly respect your committer rights.
Raymond Toy
Comment 15 2012-06-01 10:33:05 PDT
Comment on attachment 145327 [details] Patch Oops. I meant commit-queue?, not +.
WebKit Review Bot
Comment 16 2012-06-01 17:09:21 PDT
Comment on attachment 145327 [details] Patch Clearing flags on attachment: 145327 Committed r119302: <http://trac.webkit.org/changeset/119302>
WebKit Review Bot
Comment 17 2012-06-01 17:09:29 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.