Bug 1531156 - Part 2: Some code simplification that part 1 lets us do. r=smaug,jib
authorByron Campen [:bwc] <docfaraday@gmail.com>
Mon, 11 Mar 2019 21:01:21 +0000
changeset 521519 c1e7e2cb32cdd90af697743ce7dea3303a249977
parent 521518 41c4e3fc6f9d68b5a88e6002f2d6d9cf27199503
child 521520 53c759ed45e4739fafdbb80bbf78376de37d49b0
push id10867
push userdvarga@mozilla.com
push dateThu, 14 Mar 2019 15:20:45 +0000
treeherdermozilla-beta@abad13547875 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug, jib
bugs1531156
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1531156 - Part 2: Some code simplification that part 1 lets us do. r=smaug,jib Differential Revision: https://phabricator.services.mozilla.com/D22209
dom/webidl/PeerConnectionImpl.webidl
media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp
media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.h
--- a/dom/webidl/PeerConnectionImpl.webidl
+++ b/dom/webidl/PeerConnectionImpl.webidl
@@ -106,20 +106,18 @@ interface PeerConnectionImpl  {
   /* Attributes */
   /* This provides the implementation with the certificate it uses to
    * authenticate itself.  The JS side must set this before calling
    * createOffer/createAnswer or retrieving the value of fingerprint.  This has
    * to be delayed because generating the certificate takes some time. */
   attribute RTCCertificate certificate;
   [Constant]
   readonly attribute DOMString fingerprint;
-  readonly attribute DOMString localDescription;
   readonly attribute DOMString currentLocalDescription;
   readonly attribute DOMString pendingLocalDescription;
-  readonly attribute DOMString remoteDescription;
   readonly attribute DOMString currentRemoteDescription;
   readonly attribute DOMString pendingRemoteDescription;
 
   readonly attribute PCImplIceConnectionState iceConnectionState;
   readonly attribute PCImplIceGatheringState iceGatheringState;
   readonly attribute PCImplSignalingState signalingState;
   attribute DOMString id;
 
--- a/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp
+++ b/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp
@@ -2116,48 +2116,32 @@ PeerConnectionImpl::GetFingerprint(char*
   char* tmp = new char[fpStr.size() + 1];
   std::copy(fpStr.begin(), fpStr.end(), tmp);
   tmp[fpStr.size()] = '\0';
 
   *fingerprint = tmp;
   return NS_OK;
 }
 
-void PeerConnectionImpl::GetLocalDescription(nsAString& aSDP) {
-  PC_AUTO_ENTER_API_CALL_NO_CHECK();
-
-  std::string localSdp =
-      mJsepSession->GetLocalDescription(kJsepDescriptionPendingOrCurrent);
-  aSDP = NS_ConvertASCIItoUTF16(localSdp.c_str());
-}
-
 void PeerConnectionImpl::GetCurrentLocalDescription(nsAString& aSDP) {
   PC_AUTO_ENTER_API_CALL_NO_CHECK();
 
   std::string localSdp =
       mJsepSession->GetLocalDescription(kJsepDescriptionCurrent);
   aSDP = NS_ConvertASCIItoUTF16(localSdp.c_str());
 }
 
 void PeerConnectionImpl::GetPendingLocalDescription(nsAString& aSDP) {
   PC_AUTO_ENTER_API_CALL_NO_CHECK();
 
   std::string localSdp =
       mJsepSession->GetLocalDescription(kJsepDescriptionPending);
   aSDP = NS_ConvertASCIItoUTF16(localSdp.c_str());
 }
 
-void PeerConnectionImpl::GetRemoteDescription(nsAString& aSDP) {
-  PC_AUTO_ENTER_API_CALL_NO_CHECK();
-
-  std::string remoteSdp =
-      mJsepSession->GetRemoteDescription(kJsepDescriptionPendingOrCurrent);
-  aSDP = NS_ConvertASCIItoUTF16(remoteSdp.c_str());
-}
-
 void PeerConnectionImpl::GetCurrentRemoteDescription(nsAString& aSDP) {
   PC_AUTO_ENTER_API_CALL_NO_CHECK();
 
   std::string remoteSdp =
       mJsepSession->GetRemoteDescription(kJsepDescriptionCurrent);
   aSDP = NS_ConvertASCIItoUTF16(remoteSdp.c_str());
 }
 
--- a/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.h
+++ b/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.h
@@ -415,21 +415,19 @@ class PeerConnectionImpl final
   NS_IMETHODIMP GetFingerprint(char** fingerprint);
   void GetFingerprint(nsAString& fingerprint) {
     char* tmp;
     GetFingerprint(&tmp);
     fingerprint.AssignASCII(tmp);
     delete[] tmp;
   }
 
-  void GetLocalDescription(nsAString& aSDP);
   void GetCurrentLocalDescription(nsAString& aSDP);
   void GetPendingLocalDescription(nsAString& aSDP);
 
-  void GetRemoteDescription(nsAString& aSDP);
   void GetCurrentRemoteDescription(nsAString& aSDP);
   void GetPendingRemoteDescription(nsAString& aSDP);
 
   NS_IMETHODIMP SignalingState(mozilla::dom::PCImplSignalingState* aState);
 
   mozilla::dom::PCImplSignalingState SignalingState() {
     mozilla::dom::PCImplSignalingState state;
     SignalingState(&state);