Bug 59861

Summary: Enable strict OwnPtr for GTK
Product: WebKit Reporter: Adam Barth <abarth>
Component: New BugsAssignee: Adam Barth <abarth>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, gns, gustavo.noronha, mrobinson, xan.lopez
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Other   
OS: OS X 10.5   
Bug Depends on:    
Bug Blocks: 59428    
Attachments:
Description Flags
Patch
none
Updated patch
none
Patch none

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.