Bug 164636

Summary: Warning added in r208542
Product: WebKit Reporter: Alejandro G. Castro <alex>
Component: WebCore Misc.Assignee: Alejandro G. Castro <alex>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, commit-queue, eric.carlson, jer.noble, mcatanzaro, youennf
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Alejandro G. Castro
Reported 2016-11-11 01:46:16 PST
We have to call the base class explicetely in the copy constructors.
Attachments
Patch (1.55 KB, patch)
2016-11-11 01:50 PST, Alejandro G. Castro
no flags
Patch (3.19 KB, patch)
2016-11-15 03:47 PST, Alejandro G. Castro
no flags
Alejandro G. Castro
Comment 1 2016-11-11 01:50:33 PST
youenn fablet
Comment 2 2016-11-11 08:43:14 PST
Comment on attachment 294485 [details] Patch Change is fine I guess but it seems a bit strange to have a copy constructor of a refcounted class. It might be better to remove the copy constructor here. Instead, we could have a create() that would take the four parameters (source, track, and the booleans) with default values if needed. Then clone would use create() instead of the copy constructor.
Alexey Proskuryakov
Comment 3 2016-11-11 10:08:12 PST
I agree, this code smells wrong. When is the copy constructor used?
Eric Carlson
Comment 4 2016-11-11 11:36:37 PST
(In reply to comment #2) > Comment on attachment 294485 [details] > Patch > > Change is fine I guess but it seems a bit strange to have a copy constructor > of a refcounted class. > > It might be better to remove the copy constructor here. > Instead, we could have a create() that would take the four parameters > (source, track, and the booleans) with default values if needed. > Then clone would use create() instead of the copy constructor. I agree, Youenn's suggestion makes much more sense.
Alejandro G. Castro
Comment 5 2016-11-13 22:53:23 PST
*** Bug 164688 has been marked as a duplicate of this bug. ***
Alejandro G. Castro
Comment 6 2016-11-14 01:14:46 PST
(In reply to comment #4) > (In reply to comment #2) > > Comment on attachment 294485 [details] > > Patch > > > > Change is fine I guess but it seems a bit strange to have a copy constructor > > of a refcounted class. > > > > It might be better to remove the copy constructor here. > > Instead, we could have a create() that would take the four parameters > > (source, track, and the booleans) with default values if needed. > > Then clone would use create() instead of the copy constructor. > > I agree, Youenn's suggestion makes much more sense. Right, as ap was saying I'm not sure if this is even used, just fixing the refactoring problem added, I seemed fishy that is why I wanted the review for fixing the warning. I'll check it in more detail. Thanks for the review.
Alejandro G. Castro
Comment 7 2016-11-15 03:47:57 PST
WebKit Commit Bot
Comment 8 2016-11-15 22:51:54 PST
Comment on attachment 294832 [details] Patch Clearing flags on attachment: 294832 Committed r208786: <http://trac.webkit.org/changeset/208786>
WebKit Commit Bot
Comment 9 2016-11-15 22:51:58 PST
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.