Changeset 197020 in webkit
- Timestamp:
- Feb 24, 2016 12:14:58 AM (8 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r197012 r197020 1 2016-02-24 Adam Bergkvist <adam.bergkvist@ericsson.com> 2 3 WebRTC: RTCPeerConnection: Sort out responsibilities of close() and stop() 4 https://bugs.webkit.org/show_bug.cgi?id=154581 5 6 Reviewed by Eric Carlson. 7 8 Updated test with replaceTrack() call after the RTCPeerConnection object, that 9 created the RTCRtpSender, is closed. 10 11 * fast/mediastream/RTCRtpSender-replaceTrack-expected.txt: 12 * fast/mediastream/RTCRtpSender-replaceTrack.html: 13 1 14 2016-02-23 Chris Dumez <cdumez@apple.com> 2 15 -
trunk/LayoutTests/fast/mediastream/RTCRtpSender-replaceTrack-expected.txt
r194968 r197020 17 17 Stop sender, and try replacing the track 18 18 PASS promise sender.replaceTrack(audioTrack2) rejected with [object DOMError] 19 Create a new sender 20 PASS sender = pc.addTrack(audioTrack2, stream) did not throw exception. 21 Close pc and try replacing the track 22 PASS promise sender.replaceTrack(audioTrack3) rejected with [object DOMError] 19 23 End of promise chain 20 24 PASS successfullyParsed is true -
trunk/LayoutTests/fast/mediastream/RTCRtpSender-replaceTrack.html
r194968 r197020 30 30 31 31 audioTrack2 = audioTrack.clone(); 32 audioTrack3 = audioTrack.clone(); 32 33 33 34 shouldBe("pc.getSenders().length", "0"); … … 56 57 pc.removeTrack(sender); 57 58 return promiseShouldReject("sender.replaceTrack(audioTrack2)"); 59 }) 60 .catch(function () { 61 debug("Create a new sender"); 62 shouldNotThrow("sender = pc.addTrack(audioTrack2, stream)"); 63 debug("Close pc and try replacing the track"); 64 pc.close(); 65 return promiseShouldReject("sender.replaceTrack(audioTrack3)"); 58 66 }) 59 67 .catch(function () { -
trunk/Source/WebCore/ChangeLog
r197019 r197020 1 2016-02-24 Adam Bergkvist <adam.bergkvist@ericsson.com> 2 3 WebRTC: RTCPeerConnection: Sort out responsibilities of close() and stop() 4 https://bugs.webkit.org/show_bug.cgi?id=154581 5 6 Reviewed by Eric Carlson. 7 8 Let RTCPeerConnection::close() contain all teardown logic be called by stop(). 9 close() is also responisble for stopping the PeerConnectionBackend and stopping 10 all RTCRtpSender objects. 11 12 Test coverage: 13 fast/mediastream/RTCRtpSender-replaceTrack.html (updated) 14 fast/mediastream/RTCPeerConnection-closed-state.html 15 16 * Modules/mediastream/RTCPeerConnection.cpp: 17 (WebCore::RTCPeerConnection::close): 18 (WebCore::RTCPeerConnection::stop): 19 (WebCore::RTCPeerConnection::RTCPeerConnection): Deleted. 20 * Modules/mediastream/RTCPeerConnection.h: 21 1 22 2016-02-24 Adam Bergkvist <adam.bergkvist@ericsson.com> 2 23 -
trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp
r197019 r197020 80 80 , m_iceConnectionState(IceConnectionState::New) 81 81 , m_configuration(WTFMove(configuration)) 82 , m_stopped(false)83 82 { 84 83 Document& document = downcast<Document>(context); … … 368 367 return; 369 368 370 m_signalingState = SignalingState::Closed; 371 } 372 373 void RTCPeerConnection::stop() 374 { 375 if (m_stopped) 376 return; 377 378 m_stopped = true; 369 m_backend->stop(); 370 379 371 m_iceConnectionState = IceConnectionState::Closed; 380 372 m_signalingState = SignalingState::Closed; 373 374 for (auto& sender : m_senderSet) 375 sender->stop(); 376 } 377 378 void RTCPeerConnection::stop() 379 { 380 close(); 381 381 } 382 382 -
trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.h
r197019 r197020 148 148 149 149 RefPtr<RTCConfiguration> m_configuration; 150 151 bool m_stopped;152 150 }; 153 151
Note: See TracChangeset
for help on using the changeset viewer.