Bug 59861 - Enable strict OwnPtr for GTK
Summary: Enable strict OwnPtr for GTK
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other OS X 10.5
: P2 Normal
Assignee: Adam Barth
URL:
Keywords:
Depends on:
Blocks: 59428
  Show dependency treegraph
 
Reported: 2011-04-29 20:53 PDT by Adam Barth
Modified: 2011-04-30 21:16 PDT (History)
5 users (show)

See Also:


Attachments
Patch (1.02 KB, patch)
2011-04-29 21:10 PDT, Adam Barth
no flags Details | Formatted Diff | Diff
Updated patch (8.15 KB, patch)
2011-04-30 14:22 PDT, Martin Robinson
no flags Details | Formatted Diff | Diff
Patch (16.17 KB, patch)
2011-04-30 18:46 PDT, Martin Robinson
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Barth 2011-04-29 20:53:01 PDT
Enable strict OwnPtr for GTK
Comment 1 Adam Barth 2011-04-29 21:10:58 PDT
Created attachment 91795 [details]
Patch
Comment 2 Collabora GTK+ EWS bot 2011-04-30 00:20:43 PDT
Attachment 91795 [details] did not build on gtk:
Build output: http://queues.webkit.org/results/8530025
Comment 3 Martin Robinson 2011-04-30 14:22:38 PDT
Created attachment 91806 [details]
Updated patch
Comment 4 Adam Barth 2011-04-30 14:27:14 PDT
Comment on attachment 91806 [details]
Updated patch

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

> Source/WebCore/page/Geolocation.cpp:220
> -    , m_service(GeolocationService::create(this))
> +    , m_service(adoptPtr(GeolocationService::create(this)))

Should GeolocationService::create return a PassOwnPtr instead?

> Source/WebCore/platform/graphics/cairo/PathCairo.cpp:56
> +    OwnPtr<cairo_path_t> pathCopy(adoptPtr(cairo_copy_path(other.platformPath()->context())));

We tend to prefer the assignment form of the constructor for OwnPtr.
Comment 5 Martin Robinson 2011-04-30 18:46:01 PDT
Created attachment 91810 [details]
Patch
Comment 6 Martin Robinson 2011-04-30 18:50:36 PDT
(In reply to comment #4)
> (From update of attachment 91806 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=91806&action=review

Thanks for the quick review.

> > Source/WebCore/page/Geolocation.cpp:220
> > -    , m_service(GeolocationService::create(this))
> > +    , m_service(adoptPtr(GeolocationService::create(this)))
> 
> Should GeolocationService::create return a PassOwnPtr instead?

Indeed it should. I've made this change and pushed the fixes down to all the GeolocationService factory methods.

> 
> > Source/WebCore/platform/graphics/cairo/PathCairo.cpp:56
> > +    OwnPtr<cairo_path_t> pathCopy(adoptPtr(cairo_copy_path(other.platformPath()->context())));
> We tend to prefer the assignment form of the constructor for OwnPtr.

Fixed! I think I'll write an email to propose this for the style guide.
Comment 7 WebKit Commit Bot 2011-04-30 21:16:44 PDT
Comment on attachment 91810 [details]
Patch

Clearing flags on attachment: 91810

Committed r85405: <http://trac.webkit.org/changeset/85405>
Comment 8 WebKit Commit Bot 2011-04-30 21:16:50 PDT
All reviewed patches have been landed.  Closing bug.