Changeset 215299 in webkit
- Timestamp:
- Apr 12, 2017, 3:26:38 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r215290 r215299 1 2017-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 1 14 2017-04-12 Anders Carlsson <andersca@apple.com> 2 15 -
trunk/Source/WebCore/platform/SharedBuffer.h
r215262 r215299 101 101 102 102 #if USE(NETWORK_CFDATA_ARRAY_CALLBACK) 103 WEBCORE_EXPORT static Ref<SharedBuffer> wrapCFDataArray(CFArrayRef);104 103 WEBCORE_EXPORT void append(CFDataRef); 105 104 #endif … … 160 159 161 160 #if USE(NETWORK_CFDATA_ARRAY_CALLBACK) 162 explicit SharedBuffer(CFArrayRef);163 161 mutable Vector<RetainPtr<CFDataRef>> m_dataArray; 164 162 unsigned copySomeDataFromDataArray(const char*& someData, unsigned position) const; -
trunk/Source/WebCore/platform/cf/SharedBufferCF.cpp
r210532 r215299 119 119 120 120 #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 135 121 void SharedBuffer::append(CFDataRef data) 136 122 { -
trunk/Tools/ChangeLog
r215265 r215299 1 2017-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 1 11 2017-04-12 Yusuke Suzuki <utatane.tea@gmail.com> 2 12 -
trunk/Tools/TestWebKitAPI/Tests/WebCore/cocoa/SharedBuffer.mm
r210310 r215299 63 63 expectDataArraysEqual(@[ worldData ], SharedBuffer::wrapCFData((CFDataRef)worldData)->createNSDataArray().get()); 64 64 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 73 65 expectDataArraysEqual(@[ [NSData dataWithContentsOfFile:tempFilePath()] ], SharedBuffer::createWithContentsOfFile(tempFilePath())->createNSDataArray().get()); 74 66 }
Note:
See TracChangeset
for help on using the changeset viewer.