Bug 162558 - std::unique_ptr deleter functions should not check if pointer is null
Summary: std::unique_ptr deleter functions should not check if pointer is null
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: PC Linux
: P2 Trivial
Assignee: Michael Catanzaro
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-26 07:22 PDT by Michael Catanzaro
Modified: 2016-09-26 09:43 PDT (History)
3 users (show)

See Also:


Attachments
Patch (4.08 KB, patch)
2016-09-26 07:23 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:22:03 PDT
std::unique_ptr deleter functions should not check if pointer is null, because std::unique_ptr already does this before calling the deleter.
Comment 1 Michael Catanzaro 2016-09-26 07:23:53 PDT
Created attachment 289828 [details]
Patch
Comment 2 Alex Christensen 2016-09-26 08:24:19 PDT
Comment on attachment 289828 [details]
Patch

This is good.
I feel like we could add another template parameter somewhere with the deleter function and unify all of these and the CairoUniquePtr into one template.
Comment 3 Michael Catanzaro 2016-09-26 09:21:48 PDT
Comment on attachment 289828 [details]
Patch

Hm, maybe... not in this patch though!
Comment 4 WebKit Commit Bot 2016-09-26 09:42:58 PDT
Comment on attachment 289828 [details]
Patch

Clearing flags on attachment: 289828

Committed r206377: <http://trac.webkit.org/changeset/206377>
Comment 5 WebKit Commit Bot 2016-09-26 09:43:01 PDT
All reviewed patches have been landed.  Closing bug.