Skip to content
Commit b726b8b0 authored by carlosgc@webkit.org's avatar carlosgc@webkit.org
Browse files

[GTK] Add GUniquePtr

https://bugs.webkit.org/show_bug.cgi?id=127170

Reviewed by Gustavo Noronha Silva.

Source/WTF:

The idea is to replace GOwnPtr with a template alias of
std:unique_ptr. Not everything can be replaced, though, because
GOwnPtr::outPtr() doesn't seem to be possible to implement with
unique_ptr. This smart pointer is more flexible than GOwnPtr and
allows to transfer the ownership of the pointer using
std::move().

* GNUmakefile.list.am: Add new file to compilation.
* wtf/gobject/GUniquePtr.h: Added.
(WTF::GPtrDeleter::operator()):

Tools:

Add unit tests for GUniquePtr.

* TestWebKitAPI/GNUmakefile.am: Add new file to compilation.
* TestWebKitAPI/Tests/WTF/gobject/GUniquePtr.cpp: Added.
(log):
(takeLogStr):
(TestWebKitAPI::TEST):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162516 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent df985172
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment