Change nonstd::unique_ptr to take a custom deleter.
authorLei Zhang <thestig@chromium.org>
Wed, 23 Sep 2015 02:15:49 +0000 (19:15 -0700)
committerLei Zhang <thestig@chromium.org>
Wed, 23 Sep 2015 02:15:49 +0000 (19:15 -0700)
commitcef2a9c51bee4b987fc813013d45dad6535a9a46
tree6bb1cb91c327f9664ab510bca617205b638f1c6d
parent3b4382a847b5a7439a3107512dbe54c317108579
Change nonstd::unique_ptr to take a custom deleter.

Code is mostly stolen from Chromium's scoped_ptr.

- Add unit tests.
- Use this to fix a leak.

BUG=chromium:531408
R=jyasskin@chromium.org, tsepez@chromium.org

Review URL: https://codereview.chromium.org/1351383004 .
BUILD.gn
core/include/fxcrt/fx_basic.h
core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp
third_party/base/nonstd_unique_ptr.h
third_party/base/nonstd_unique_ptr_unittest.cpp
third_party/base/template_util.h