Changeset 215299 in webkit


Ignore:
Timestamp:
Apr 12, 2017, 3:26:38 PM (8 years ago)
Author:
achristensen@apple.com
Message:

Remove unused SharedBuffer::wrapCFDataArray
https://bugs.webkit.org/show_bug.cgi?id=170794

Reviewed by Brady Eidson.

Source/WebCore:

It's unused since r215280.

  • platform/SharedBuffer.h:
  • platform/cf/SharedBufferCF.cpp:

(WebCore::SharedBuffer::wrapCFDataArray): Deleted.

Tools:

  • TestWebKitAPI/Tests/WebCore/cocoa/SharedBuffer.mm:

(TestWebKitAPI::TEST_F):

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r215290 r215299  
     12017-04-12  Alex Christensen  <achristensen@webkit.org>
     2
     3        Remove unused SharedBuffer::wrapCFDataArray
     4        https://bugs.webkit.org/show_bug.cgi?id=170794
     5
     6        Reviewed by Brady Eidson.
     7
     8        It's unused since r215280.
     9
     10        * platform/SharedBuffer.h:
     11        * platform/cf/SharedBufferCF.cpp:
     12        (WebCore::SharedBuffer::wrapCFDataArray): Deleted.
     13
    1142017-04-12  Anders Carlsson  <andersca@apple.com>
    215
  • trunk/Source/WebCore/platform/SharedBuffer.h

    r215262 r215299  
    101101
    102102#if USE(NETWORK_CFDATA_ARRAY_CALLBACK)
    103     WEBCORE_EXPORT static Ref<SharedBuffer> wrapCFDataArray(CFArrayRef);
    104103    WEBCORE_EXPORT void append(CFDataRef);
    105104#endif
     
    160159
    161160#if USE(NETWORK_CFDATA_ARRAY_CALLBACK)
    162     explicit SharedBuffer(CFArrayRef);
    163161    mutable Vector<RetainPtr<CFDataRef>> m_dataArray;
    164162    unsigned copySomeDataFromDataArray(const char*& someData, unsigned position) const;
  • trunk/Source/WebCore/platform/cf/SharedBufferCF.cpp

    r210532 r215299  
    119119
    120120#if USE(NETWORK_CFDATA_ARRAY_CALLBACK)
    121 Ref<SharedBuffer> SharedBuffer::wrapCFDataArray(CFArrayRef cfDataArray)
    122 {
    123     return adoptRef(*new SharedBuffer(cfDataArray));
    124 }
    125 
    126 SharedBuffer::SharedBuffer(CFArrayRef cfDataArray)
    127     : m_buffer(adoptRef(*new DataBuffer))
    128     , m_cfData(nullptr)
    129 {
    130     CFIndex dataArrayCount = CFArrayGetCount(cfDataArray);
    131     for (CFIndex index = 0; index < dataArrayCount; ++index)
    132         append(checked_cf_cast<CFDataRef>(CFArrayGetValueAtIndex(cfDataArray, index)));
    133 }
    134 
    135121void SharedBuffer::append(CFDataRef data)
    136122{
  • trunk/Tools/ChangeLog

    r215265 r215299  
     12017-04-12  Alex Christensen  <achristensen@webkit.org>
     2
     3        Remove unused SharedBuffer::wrapCFDataArray
     4        https://bugs.webkit.org/show_bug.cgi?id=170794
     5
     6        Reviewed by Brady Eidson.
     7
     8        * TestWebKitAPI/Tests/WebCore/cocoa/SharedBuffer.mm:
     9        (TestWebKitAPI::TEST_F):
     10
    1112017-04-12  Yusuke Suzuki  <utatane.tea@gmail.com>
    212
  • trunk/Tools/TestWebKitAPI/Tests/WebCore/cocoa/SharedBuffer.mm

    r210310 r215299  
    6363        expectDataArraysEqual(@[ worldData ], SharedBuffer::wrapCFData((CFDataRef)worldData)->createNSDataArray().get());
    6464
    65         NSArray<NSData *> *dataArray = @[ [NSData dataWithBytes:"one" length:3], [NSData dataWithBytes:"two" length:3], [NSData dataWithBytes:"three" length:5] ];
    66         auto wrappedDataArray = SharedBuffer::wrapCFDataArray((CFArrayRef)dataArray);
    67         expectDataArraysEqual(dataArray, wrappedDataArray->createNSDataArray().get());
    68 
    69         NSArray<NSData *> *secondDataArray = @[ [NSData dataWithBytes:"four" length:4], [NSData dataWithBytes:"five" length:4], [NSData dataWithBytes:"six" length:3] ];
    70         wrappedDataArray->append(SharedBuffer::wrapCFDataArray((CFArrayRef)secondDataArray).get());
    71         expectDataArraysEqual([dataArray arrayByAddingObjectsFromArray:secondDataArray], wrappedDataArray->createNSDataArray().get());
    72 
    7365        expectDataArraysEqual(@[ [NSData dataWithContentsOfFile:tempFilePath()] ], SharedBuffer::createWithContentsOfFile(tempFilePath())->createNSDataArray().get());
    7466    }
Note: See TracChangeset for help on using the changeset viewer.