Fix a WebRTC data channel issue for non-ASCII characters.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 11 Apr 2018 15:28:37 +0000 (15:28 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 11 Apr 2018 15:28:37 +0000 (15:28 +0000)
commit1d51d3e56074b878b581cd2354aa6c67dcf00e33
tree611ca009f38180cb08448b99d8bf9977fa5972e3
parentadc2e5d0962759c66a6268c3cbf239e88a98ac83
Fix a WebRTC data channel issue for non-ASCII characters.

At the sender side, buffer size are calulcated after UTF8 encoding. At the
receiver side, strings are constructed with UTF8 data.

https://bugs.webkit.org/show_bug.cgi?id=184481

Patch by Jianjun Zhu <jianjun.zhu@intel.com> on 2018-04-11
Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

* web-platform-tests/webrtc/RTCDataChannel-send-expected.txt:

Source/WebCore:

Updated test:
LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCDataChannel-send-expected.txt

* Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.cpp:
(WebCore::LibWebRTCDataChannelHandler::sendStringData):
(WebCore::LibWebRTCDataChannelHandler::OnMessage):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@230524 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCDataChannel-send-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.cpp