Bug 162557

Summary: Add CairoUniquePtr and use it in FontPlatformDataFreetype.cpp
Product: WebKit Reporter: Michael Catanzaro <mcatanzaro>
Component: WebKit Misc.Assignee: Michael Catanzaro <mcatanzaro>
Status: RESOLVED FIXED    
Severity: Normal CC: bugs-noreply, commit-queue, mcatanzaro, mmaxfield
Priority: P2    
Version: WebKit Nightly Build   
Hardware: PC   
OS: Linux   
Attachments:
Description Flags
Patch none

Description Michael Catanzaro 2016-09-26 07:13:21 PDT
Add CairoUniquePtr and use it in FontPlatformDataFreetype.cpp
Comment 1 Michael Catanzaro 2016-09-26 07:16:17 PDT
Created attachment 289826 [details]
Patch
Comment 2 Alex Christensen 2016-09-26 08:26:29 PDT
Comment on attachment 289826 [details]
Patch

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

> Source/WebCore/platform/graphics/cairo/CairoUniquePtr.h:41
> +    void operator() (cairo_font_options_t* ptr) const

At first glance, it isn't obvious to me why this uses operator() instead of the destructor, but that's what all the other such smart pointers with custom deleters do.
r=me, see my feedback in https://bugs.webkit.org/show_bug.cgi?id=162558 about uniting all of these.
Comment 3 Michael Catanzaro 2016-09-26 11:54:03 PDT
(In reply to comment #2)
> At first glance, it isn't obvious to me why this uses operator() instead of
> the destructor, but that's what all the other such smart pointers with
> custom deleters do.

The deleter has to be a function object, so it uses operator()
Comment 4 WebKit Commit Bot 2016-09-26 11:59:41 PDT
Comment on attachment 289826 [details]
Patch

Clearing flags on attachment: 289826

Committed r206383: <http://trac.webkit.org/changeset/206383>
Comment 5 WebKit Commit Bot 2016-09-26 11:59:46 PDT
All reviewed patches have been landed.  Closing bug.