Changeset 162516 in webkit


Ignore:
Timestamp:
Jan 22, 2014 6:03:21 AM (10 years ago)
Author:
Carlos Garcia Campos
Message:

[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):

Location:
trunk
Files:
3 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WTF/ChangeLog

    r162355 r162516  
     12014-01-22  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        [GTK] Add GUniquePtr
     4        https://bugs.webkit.org/show_bug.cgi?id=127170
     5
     6        Reviewed by Gustavo Noronha Silva.
     7
     8        The idea is to replace GOwnPtr with a template alias of
     9        std:unique_ptr. Not everything can be replaced, though, because
     10        GOwnPtr::outPtr() doesn't seem to be possible to implement with
     11        unique_ptr. This smart pointer is more flexible than GOwnPtr and
     12        allows to transfer the ownership of the pointer using
     13        std::move().
     14
     15        * GNUmakefile.list.am: Add new file to compilation.
     16        * wtf/gobject/GUniquePtr.h: Added.
     17        (WTF::GPtrDeleter::operator()):
     18
    1192014-01-20  Anders Carlsson  <andersca@apple.com>
    220
  • trunk/Source/WTF/GNUmakefile.list.am

    r161999 r162516  
    215215    Source/WTF/wtf/gobject/GRefPtr.h \
    216216    Source/WTF/wtf/gobject/GTypedefs.h \
     217    Source/WTF/wtf/gobject/GUniquePtr.h \
    217218    Source/WTF/wtf/gobject/GlibUtilities.cpp \
    218219    Source/WTF/wtf/gobject/GlibUtilities.h \
  • trunk/Tools/ChangeLog

    r162512 r162516  
     12014-01-22  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3
     4        [GTK] Add GUniquePtr
     5        https://bugs.webkit.org/show_bug.cgi?id=127170
     6
     7        Reviewed by Gustavo Noronha Silva.
     8
     9        Add unit tests for GUniquePtr.
     10
     11        * TestWebKitAPI/GNUmakefile.am: Add new file to compilation.
     12        * TestWebKitAPI/Tests/WTF/gobject/GUniquePtr.cpp: Added.
     13        (log):
     14        (takeLogStr):
     15        (TestWebKitAPI::TEST):
     16
    1172014-01-22  Jinwoo Song  <jinwoo7.song@samsung.com>
    218
  • trunk/Tools/TestWebKitAPI/GNUmakefile.am

    r161545 r162516  
    229229        Tools/TestWebKitAPI/Tests/WTF/TemporaryChange.cpp \
    230230        Tools/TestWebKitAPI/Tests/WTF/Vector.cpp \
     231        Tools/TestWebKitAPI/Tests/WTF/gobject/GUniquePtr.cpp \
    231232        Tools/TestWebKitAPI/WTFStringUtilities.h
    232233
Note: See TracChangeset for help on using the changeset viewer.