• carlosgc@webkit.org's avatar
    [GTK] Add GUniquePtr · b726b8b0
    carlosgc@webkit.org authored
    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
    b726b8b0