Bug 107373 - Clean up missing *explicit* keyword in ctors of WebCore/rendering
Summary: Clean up missing *explicit* keyword in ctors of WebCore/rendering
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Gyuyoung Kim
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-19 05:15 PST by Gyuyoung Kim
Modified: 2013-01-20 19:53 PST (History)
8 users (show)

See Also:


Attachments
Patch (26.01 KB, patch)
2013-01-19 05:17 PST, Gyuyoung Kim
no flags Details | Formatted Diff | Diff
Patch (14.69 KB, patch)
2013-01-20 00:26 PST, Gyuyoung Kim
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gyuyoung Kim 2013-01-19 05:15:09 PST
Add *explicit* keyword to WebCore/rendering to avoid implicit type conversion.
Comment 1 Gyuyoung Kim 2013-01-19 05:17:49 PST
Created attachment 183621 [details]
Patch
Comment 2 Darin Adler 2013-01-19 08:23:48 PST
Comment on attachment 183621 [details]
Patch

This is OK, but the patch has minimal benefit. There is near zero risk of accidentally doing implicit construction of these classes from these pointer types. Just no real chance this will arise idiomatically. Except maybe RenderArena.
Comment 3 Darin Adler 2013-01-19 08:24:36 PST
Comment on attachment 183621 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=183621&action=review

> Source/WebCore/rendering/RenderGeometryMap.h:46
> -    RenderGeometryMapStep(const RenderGeometryMapStep& o)
> +    explicit RenderGeometryMapStep(const RenderGeometryMapStep& o)

Oops, missed this one. This is wrong. Please don’t land this change. There is no reason to mark a copy constructor explicit!
Comment 4 Gyuyoung Kim 2013-01-20 00:26:26 PST
Created attachment 183660 [details]
Patch
Comment 5 Gyuyoung Kim 2013-01-20 00:27:38 PST
(In reply to comment #3)
> (From update of attachment 183621 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=183621&action=review
> 
> > Source/WebCore/rendering/RenderGeometryMap.h:46
> > -    RenderGeometryMapStep(const RenderGeometryMapStep& o)
> > +    explicit RenderGeometryMapStep(const RenderGeometryMapStep& o)
> 
> Oops, missed this one. This is wrong. Please don’t land this change. There is no reason to mark a copy constructor explicit!

Thank you for your review. There was wrong one as you pointed out. Fixed it.
Comment 6 WebKit Review Bot 2013-01-20 19:53:30 PST
Comment on attachment 183660 [details]
Patch

Clearing flags on attachment: 183660

Committed r140291: <http://trac.webkit.org/changeset/140291>
Comment 7 WebKit Review Bot 2013-01-20 19:53:35 PST
All reviewed patches have been landed.  Closing bug.