Changeset 244196 in webkit
- Timestamp:
- Apr 11, 2019 2:51:10 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/imported/w3c/ChangeLog
r244182 r244196 1 2019-04-11 Youenn Fablet <youenn@apple.com> 2 3 Support RTCDataChannel blob binaryType 4 https://bugs.webkit.org/show_bug.cgi?id=196821 5 6 Reviewed by Eric Carlson. 7 8 * web-platform-tests/webrtc/RTCDataChannel-send-expected.txt: 9 1 10 2019-04-10 Said Abou-Hallawa <sabouhallawa@apple.com> 2 11 -
trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCDataChannel-send-expected.txt
r230524 r244196 7 7 PASS Data channel should be able to send ArrayBuffer message and receive as ArrayBuffer 8 8 FAIL Data channel should be able to send Blob message and receive as ArrayBuffer promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 9 FAIL Data channel should be able to send ArrayBuffer message and receive as Blob promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 9 PASS Data channel should be able to send ArrayBuffer message and receive as Blob 10 10 FAIL Data channel binaryType should receive message as Blob by default assert_equals: Expect initial binaryType value to be blob expected "blob" but got "arraybuffer" 11 11 FAIL Sending multiple messages with different types should succeed and be received assert_unreached: Unexpected promise rejection: NotSupportedError: The operation is not supported. Reached unreachable code -
trunk/Source/WebCore/ChangeLog
r244195 r244196 1 2019-04-11 Youenn Fablet <youenn@apple.com> 2 3 Support RTCDataChannel blob binaryType 4 https://bugs.webkit.org/show_bug.cgi?id=196821 5 6 Reviewed by Eric Carlson. 7 8 Add support for receiving blobs. 9 Default value is still left to 'arraybuffer' which is not spec compliant. 10 Covered by rebased test. 11 12 * Modules/mediastream/RTCDataChannel.cpp: 13 (WebCore::RTCDataChannel::setBinaryType): 14 (WebCore::RTCDataChannel::didReceiveRawData): 15 1 16 2019-04-11 Devin Rousso <drousso@apple.com> 2 17 -
trunk/Source/WebCore/Modules/mediastream/RTCDataChannel.cpp
r243887 r244196 35 35 #include "RTCDataChannelHandler.h" 36 36 #include "ScriptExecutionContext.h" 37 #include "SharedBuffer.h" 37 38 #include <JavaScriptCore/ArrayBuffer.h> 38 39 #include <JavaScriptCore/ArrayBufferView.h> … … 98 99 ExceptionOr<void> RTCDataChannel::setBinaryType(const AtomicString& binaryType) 99 100 { 100 if (binaryType == blobKeyword()) 101 return Exception { NotSupportedError }; 101 if (binaryType == blobKeyword()) { 102 m_binaryType = BinaryType::Blob; 103 return { }; 104 } 102 105 if (binaryType == arraybufferKeyword()) { 103 106 m_binaryType = BinaryType::ArrayBuffer; … … 198 201 return; 199 202 200 if (m_binaryType == BinaryType::Blob) { 201 // FIXME: Implement. 202 return; 203 } 204 205 if (m_binaryType == BinaryType::ArrayBuffer) { 203 switch (m_binaryType) { 204 case BinaryType::Blob: 205 scheduleDispatchEvent(MessageEvent::create(Blob::create(SharedBuffer::create(data, dataLength), emptyString()), { })); 206 return; 207 case BinaryType::ArrayBuffer: 206 208 scheduleDispatchEvent(MessageEvent::create(ArrayBuffer::create(data, dataLength))); 207 209 return;
Note: See TracChangeset
for help on using the changeset viewer.