Bug 162557 - Add CairoUniquePtr and use it in FontPlatformDataFreetype.cpp
Summary: Add CairoUniquePtr and use it in FontPlatformDataFreetype.cpp
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: PC Linux
: P2 Normal
Assignee: Michael Catanzaro
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-26 07:13 PDT by Michael Catanzaro
Modified: 2016-09-26 11:59 PDT (History)
4 users (show)

See Also:


Attachments
Patch (5.38 KB, patch)
2016-09-26 07:16 PDT, Michael Catanzaro
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.