RTCDataChannel connectivity issues in Safari 11
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 14 Sep 2017 19:45:31 +0000 (19:45 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 14 Sep 2017 19:45:31 +0000 (19:45 +0000)
commitf646b24b92459f5b666359effdc7adcc7b29b89e
tree5d067fabe29ac18f72cf9f19e05b7c7160d41562
parentb21b50c872f26310f77ba515ae70cbbd49a9c5d2
RTCDataChannel connectivity issues in Safari 11
https://bugs.webkit.org/show_bug.cgi?id=173052
<rdar://problem/32712143>

Patch by Youenn Fablet <youenn@apple.com> on 2017-09-14
Reviewed by Alex Christensen.

Source/WebCore:

Covered by updated test.

Before the patch, when sending an ArrayBufferView, RTCDataChannel was sending the whole ArrayBuffer backing the ArrayBufferView.
With this patch, RTCDataChannel will now send only the bytes the ArrayBufferView is exposing.

* Modules/mediastream/RTCDataChannel.cpp:
(WebCore::RTCDataChannel::send): Correctly handling sending of ArrayBufferView.
(WebCore::RTCDataChannel::sendRawData): Helper routine for raw data sending.
* Modules/mediastream/RTCDataChannel.h:

LayoutTests:

* webrtc/datachannel/binary-expected.txt:
* webrtc/datachannel/binary.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222045 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/webrtc/datachannel/binary-expected.txt
LayoutTests/webrtc/datachannel/binary.html
Source/WebCore/ChangeLog
Source/WebCore/Modules/mediastream/RTCDataChannel.cpp
Source/WebCore/Modules/mediastream/RTCDataChannel.h