WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
164636
Warning added in
r208542
https://bugs.webkit.org/show_bug.cgi?id=164636
Summary
Warning added in r208542
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
Details
Formatted Diff
Diff
Patch
(3.19 KB, patch)
2016-11-15 03:47 PST
,
Alejandro G. Castro
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Alejandro G. Castro
Comment 1
2016-11-11 01:50:33 PST
Created
attachment 294485
[details]
Patch
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
Created
attachment 294832
[details]
Patch
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.
Top of Page
Format For Printing
XML
Clone This Bug