Stop RTCDataChannel when closing page
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 28 Mar 2017 19:03:21 +0000 (19:03 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 28 Mar 2017 19:03:21 +0000 (19:03 +0000)
commit5809675717ca3d889e6086a77403b3c69be622fa
tree5ad693345697a4042f85d0fc8cbde19f270f25f1
parentde631db54091a70ffc47b5f91c39cdb357b5bd58
Stop RTCDataChannel when closing page
https://bugs.webkit.org/show_bug.cgi?id=170166

Patch by Youenn Fablet <youenn@apple.com> on 2017-03-28
Reviewed by Eric Carlson.

Source/WebCore:

Test: webrtc/datachannel/datachannel-gc.html

Making RTCDataChannel an ActiveDOMObject.
Closing the data channel backend and freeing upon close and stop.

* Modules/mediastream/RTCDataChannel.cpp:
(WebCore::RTCDataChannel::create):
(WebCore::RTCDataChannel::RTCDataChannel):
(WebCore::RTCDataChannel::close):
(WebCore::RTCDataChannel::stop):
* Modules/mediastream/RTCDataChannel.h:
* Modules/mediastream/RTCDataChannel.idl:
* Modules/mediastream/RTCPeerConnection.h:

LayoutTests:

* webrtc/datachannel/datachannel-gc-expected.txt: Added.
* webrtc/datachannel/datachannel-gc.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214485 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/webrtc/datachannel/datachannel-gc-expected.txt [new file with mode: 0644]
LayoutTests/webrtc/datachannel/datachannel-gc.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/Modules/mediastream/RTCDataChannel.cpp
Source/WebCore/Modules/mediastream/RTCDataChannel.h
Source/WebCore/Modules/mediastream/RTCDataChannel.idl
Source/WebCore/Modules/mediastream/RTCPeerConnection.h