Bug 1218326: Prevent datachannel operations on closed PeerConnections. r=jesup a=lizzard
authorByron Campen [:bwc] <docfaraday@gmail.com>
Wed, 28 Oct 2015 12:48:17 -0500
changeset 296750 d8f0412f38f7
parent 296749 e4802c73f705
child 296751 c2a9881ff15f
child 296753 d79858a3f24f
child 296754 89a325fb8988
push id5318
push userkwierso@gmail.com
push date2015-11-16 23:07 +0000
treeherdermozilla-beta@d8f0412f38f7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjesup, lizzard
bugs1218326
milestone43.0
Bug 1218326: Prevent datachannel operations on closed PeerConnections. r=jesup a=lizzard
media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp
--- a/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp
+++ b/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp
@@ -1094,17 +1094,17 @@ PeerConnectionImpl::ConfigureJsepSession
 }
 
 // Data channels won't work without a window, so in order for the C++ unit
 // tests to work (it doesn't have a window available) we ifdef the following
 // two implementations.
 NS_IMETHODIMP
 PeerConnectionImpl::EnsureDataConnection(uint16_t aNumstreams)
 {
-  PC_AUTO_ENTER_API_CALL_NO_CHECK();
+  PC_AUTO_ENTER_API_CALL(false);
 
 #if !defined(MOZILLA_EXTERNAL_LINKAGE)
   if (mDataConnection) {
     CSFLogDebug(logTag,"%s DataConnection already connected",__FUNCTION__);
     // Ignore the request to connect when already connected.  This entire
     // implementation is temporary.  Ignore aNumstreams as it's merely advisory
     // and we increase the number of streams dynamically as needed.
     return NS_OK;
@@ -1242,17 +1242,17 @@ PeerConnectionImpl::AddTrackToJsepSessio
   }
 
   return NS_OK;
 }
 
 nsresult
 PeerConnectionImpl::InitializeDataChannel()
 {
-  PC_AUTO_ENTER_API_CALL_NO_CHECK();
+  PC_AUTO_ENTER_API_CALL(false);
   CSFLogDebug(logTag, "%s", __FUNCTION__);
 
   const JsepApplicationCodecDescription* codec;
   uint16_t level;
   nsresult rv = GetDatachannelParameters(&codec, &level);
 
   NS_ENSURE_SUCCESS(rv, rv);
 
@@ -1324,17 +1324,17 @@ PeerConnectionImpl::CreateDataChannel(co
                                       uint16_t aType,
                                       bool outOfOrderAllowed,
                                       uint16_t aMaxTime,
                                       uint16_t aMaxNum,
                                       bool aExternalNegotiated,
                                       uint16_t aStream,
                                       nsDOMDataChannel** aRetval)
 {
-  PC_AUTO_ENTER_API_CALL_NO_CHECK();
+  PC_AUTO_ENTER_API_CALL(false);
   MOZ_ASSERT(aRetval);
 
 #if !defined(MOZILLA_EXTERNAL_LINKAGE)
   nsRefPtr<DataChannel> dataChannel;
   DataChannelConnection::Type theType =
     static_cast<DataChannelConnection::Type>(aType);
 
   nsresult rv = EnsureDataConnection(WEBRTC_DATACHANNEL_STREAMS_DEFAULT);