Bug 1110478 - Remove obsolete peerConnectionImpl.connectDataConnection. r=smaug, r=jesup
authorJan-Ivar Bruaroey <jib@mozilla.com>
Fri, 12 Dec 2014 13:00:42 -0500
changeset 219580 271cdc36bd421a7b99c8dcd8e57ff1c4bcdd0acd
parent 219579 38116e28a7b89192be15bfbb586a23032f3af714
child 219581 14b3d9fca1e778428940cad1c2fe59d15bc73df2
push idunknown
push userunknown
push dateunknown
reviewerssmaug, jesup
bugs1110478
milestone37.0a1
Bug 1110478 - Remove obsolete peerConnectionImpl.connectDataConnection. r=smaug, r=jesup
dom/media/PeerConnection.js
dom/webidl/PeerConnectionImpl.webidl
media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp
media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.h
--- a/dom/media/PeerConnection.js
+++ b/dom/media/PeerConnection.js
@@ -1080,31 +1080,16 @@ RTCPeerConnection.prototype = {
 
     // Synchronous since it doesn't block.
     let channel = this._impl.createDataChannel(
       label, protocol, type, !dict.ordered, dict.maxRetransmitTime,
       dict.maxRetransmits, dict.negotiated ? true : false,
       dict.id != undefined ? dict.id : 0xFFFF
     );
     return channel;
-  },
-
-  connectDataConnection: function(localport, remoteport, numstreams) {
-    if (numstreams == undefined || numstreams <= 0) {
-      numstreams = 16;
-    }
-    this._queueOrRun({
-      func: this._connectDataConnection,
-      args: [localport, remoteport, numstreams],
-      wait: false
-    });
-  },
-
-  _connectDataConnection: function(localport, remoteport, numstreams) {
-    this._impl.connectDataConnection(localport, remoteport, numstreams);
   }
 };
 
 // This is a separate object because we don't want to expose it to DOM.
 function PeerConnectionObserver() {
   this._dompc = null;
 }
 PeerConnectionObserver.prototype = {
--- a/dom/webidl/PeerConnectionImpl.webidl
+++ b/dom/webidl/PeerConnectionImpl.webidl
@@ -81,12 +81,9 @@ interface PeerConnectionImpl  {
   readonly attribute boolean privacyRequested;
 
   /* Data channels */
   [Throws]
   DataChannel createDataChannel(DOMString label, DOMString protocol,
     unsigned short type, boolean outOfOrderAllowed,
     unsigned short maxTime, unsigned short maxNum,
     boolean externalNegotiated, unsigned short stream);
-  [Throws]
-  void connectDataConnection(unsigned short localport,
-    unsigned short remoteport, unsigned short numstreams);
 };
--- a/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp
+++ b/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp
@@ -946,27 +946,16 @@ PeerConnectionImpl::CreateFakeMediaStrea
 #endif
     }
   }
 
   stream.forget(aRetval);
   return NS_OK;
 }
 
-// Stubbing this call out for now.
-// We can remove it when we are confident of datachannels being started
-// correctly on SDP negotiation (bug 852908)
-NS_IMETHODIMP
-PeerConnectionImpl::ConnectDataConnection(uint16_t aLocalport,
-                                          uint16_t aRemoteport,
-                                          uint16_t aNumstreams)
-{
-  return NS_OK; // InitializeDataChannel(aLocalport, aRemoteport, aNumstreams);
-}
-
 // 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();
 
--- a/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.h
+++ b/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.h
@@ -520,24 +520,16 @@ public:
   }
 
   bool PluginCrash(uint64_t aPluginID,
                    const nsAString& aPluginName,
                    const nsAString& aPluginDumpID);
 
   nsresult InitializeDataChannel();
 
-  NS_IMETHODIMP_TO_ERRORRESULT(ConnectDataConnection, ErrorResult &rv,
-                               uint16_t aLocalport,
-                               uint16_t aRemoteport,
-                               uint16_t aNumstreams)
-  {
-    rv = ConnectDataConnection(aLocalport, aRemoteport, aNumstreams);
-  }
-
   NS_IMETHODIMP_TO_ERRORRESULT_RETREF(nsDOMDataChannel,
                                       CreateDataChannel, ErrorResult &rv,
                                       const nsAString& aLabel,
                                       const nsAString& aProtocol,
                                       uint16_t aType,
                                       bool outOfOrderAllowed,
                                       uint16_t aMaxTime,
                                       uint16_t aMaxNum,