⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 264163 in webkit


Ignore:
Timestamp:
Jul 9, 2020, 2:36:52 AM (6 years ago)
Author:
calvaris@igalia.com
Message:

[WTF] Implement new BoxPtr alias
​https://bugs.webkit.org/show_bug.cgi?id=212379

Reviewed by Darin Adler.

Source/WTF:

Added BoxPtr.h that includes BoxPtr<T> as alias of
Box<std::unique_ptr<T>>. We discussed about this class on bugzilla
and we agreed on this alias being the best idea. Apart from the
alias I'm adding a couple of helpers like a create function and
the operator== and operator!=.

Tests: BoxPtr API tests added.

  • WTF.xcodeproj/project.pbxproj:
  • wtf/BoxPtr.h: Added.

(WTF::createBoxPtr):
(WTF::operator==):
(WTF::operator!=):

  • wtf/CMakeLists.txt:

Tools:

Tests for BoxPtr.

  • TestWebKitAPI/CMakeLists.txt:
  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WTF/BoxPtr.cpp: Added.

(TestWebKitAPI::BoxPtrLogger::create):
(TestWebKitAPI::BoxPtrLogger::BoxPtrLogger):
(TestWebKitAPI::boxPtrLoggerDeleter):
(TestWebKitAPI::TEST):

Location:
trunk
Files:
2 added
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WTF/ChangeLog

    r264148 r264163  
     12020-07-09  Xabier Rodriguez Calvar  <calvaris@igalia.com>
     2
     3        [WTF] Implement new BoxPtr alias
     4        https://bugs.webkit.org/show_bug.cgi?id=212379
     5
     6        Reviewed by Darin Adler.
     7
     8        Added BoxPtr.h that includes BoxPtr<T> as alias of
     9        Box<std::unique_ptr<T>>. We discussed about this class on bugzilla
     10        and we agreed on this alias being the best idea. Apart from the
     11        alias I'm adding a couple of helpers like a create function and
     12        the operator== and operator!=.
     13
     14        Tests: BoxPtr API tests added.
     15
     16        * WTF.xcodeproj/project.pbxproj:
     17        * wtf/BoxPtr.h: Added.
     18        (WTF::createBoxPtr):
     19        (WTF::operator==):
     20        (WTF::operator!=):
     21        * wtf/CMakeLists.txt:
     22
    1232020-07-08  Per Arne Vollan  <pvollan@apple.com>
    224
  • trunk/Source/WTF/WTF.xcodeproj/project.pbxproj

    r263771 r264163  
    259259                0F8F2B9B172F2594007DBDA5 /* ConversionMode.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ConversionMode.h; sourceTree = "<group>"; };
    260260                0F93274A1C17F4B700CF6564 /* Box.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Box.h; sourceTree = "<group>"; };
     261                0F93274A1C17F4B700CF6566 /* BoxPtr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BoxPtr.h; sourceTree = "<group>"; };
    261262                0F9495831C571CC900413A48 /* OrderMaker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OrderMaker.h; sourceTree = "<group>"; };
    262263                0F95B63120CB4B7700479635 /* DebugHeap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DebugHeap.h; sourceTree = "<group>"; };
    … …  
    958959                                0FB399B820AF5A580017E213 /* BooleanLattice.h */,
    959960                                0F93274A1C17F4B700CF6564 /* Box.h */,
     961                                0F93274A1C17F4B700CF6566 /* BoxPtr.h */,
    960962                                7C3F72391D78811900674E26 /* Brigand.h */,
    961963                                0F4570441BE834410062A629 /* BubbleSort.h */,
  • trunk/Source/WTF/wtf/CMakeLists.txt

    r263771 r264163  
    1818    BooleanLattice.h
    1919    Box.h
     20    BoxPtr.h
    2021    Brigand.h
    2122    BubbleSort.h
  • trunk/Tools/ChangeLog

    r264156 r264163  
     12020-07-09  Xabier Rodriguez Calvar  <calvaris@igalia.com>
     2
     3        [WTF] Implement new BoxPtr alias
     4        https://bugs.webkit.org/show_bug.cgi?id=212379
     5
     6        Reviewed by Darin Adler.
     7
     8        Tests for BoxPtr.
     9
     10        * TestWebKitAPI/CMakeLists.txt:
     11        * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
     12        * TestWebKitAPI/Tests/WTF/BoxPtr.cpp: Added.
     13        (TestWebKitAPI::BoxPtrLogger::create):
     14        (TestWebKitAPI::BoxPtrLogger::BoxPtrLogger):
     15        (TestWebKitAPI::boxPtrLoggerDeleter):
     16        (TestWebKitAPI::TEST):
     17
    1182020-07-09  Carlos Garcia Campos  <cgarcia@igalia.com>
    219
  • trunk/Tools/TestWebKitAPI/CMakeLists.txt

    r263759 r264163  
    2929    Tests/WTF/Bitmap.cpp
    3030    Tests/WTF/BloomFilter.cpp
     31    Tests/WTF/BoxPtr.cpp
    3132    Tests/WTF/BumpPointerAllocator.cpp
    3233    Tests/WTF/CString.cpp
  • trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj

    r264128 r264163  
    560560                7C83DF151D0A590C00FEBCF3 /* RefCounter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86BD19971A2DB05B006DCF0A /* RefCounter.cpp */; };
    561561                7C83DF161D0A590C00FEBCF3 /* RefPtr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93A427A8180D9B0700CD24D7 /* RefPtr.cpp */; };
     562                7C83DF181D0A590C00FEBCF3 /* BoxPtr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93A427AE180DA60F00CD24D7 /* BoxPtr.cpp */; };
    562563                7C83DF1D1D0A590C00FEBCF3 /* Lock.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FFC45A41B73EBE20085BD62 /* Lock.cpp */; };
    563564                7C83DF241D0A590C00FEBCF3 /* RetainPtr.mm in Sources */ = {isa = PBXBuildFile; fileRef = BC029B1B1486B25900817DA9 /* RetainPtr.mm */; };
    … …  
    23492350                93A427AC180DA60F00CD24D7 /* MoveOnly.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MoveOnly.h; sourceTree = "<group>"; };
    23502351                93A427AD180DA60F00CD24D7 /* RefLogger.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RefLogger.h; sourceTree = "<group>"; };
     2352                93A427AE180DA60F00CD24D7 /* BoxPtr.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BoxPtr.cpp; sourceTree = "<group>"; };
    23512353                93A720E518F1A0E800A848E1 /* CalculationValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CalculationValue.cpp; sourceTree = "<group>"; };
    23522354                93ABA80816DDAB91002DB2FA /* StringHasher.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StringHasher.cpp; sourceTree = "<group>"; };
    … …  
    40364038                                FE2D9473245EB2DF00E48135 /* Bitmap.cpp */,
    40374039                                E40019301ACE9B5C001B0A2A /* BloomFilter.cpp */,
     4040                                93A427AE180DA60F00CD24D7 /* BoxPtr.cpp */,
    40384041                                0451A5A6235E438E009DF945 /* BumpPointerAllocator.cpp */,
    40394042                                A7A966DA140ECCC8005EF9B4 /* CheckedArithmeticOperations.cpp */,
    … …  
    47554758                                1ADAD1501D77A9F600212586 /* BlockPtr.mm in Sources */,
    47564759                                7C83DE9C1D0A590C00FEBCF3 /* BloomFilter.cpp in Sources */,
     4760                                7C83DF181D0A590C00FEBCF3 /* BoxPtr.cpp in Sources */,
    47574761                                04DB2396235E43EC00328F17 /* BumpPointerAllocator.cpp in Sources */,
    47584762                                7C83DEA01D0A590C00FEBCF3 /* CheckedArithmeticOperations.cpp in Sources */,
Note: See TracChangeset for help on using the changeset viewer.