Bug 1550364 part 3. Remove unused nsIUDPSocketChild methods. r=baku
authorBoris Zbarsky <bzbarsky@mit.edu>
Thu, 09 May 2019 06:55:06 +0000
changeset 535174 2e9edc96c3d22f6aab3cc9bb69125b134a381b82
parent 535173 f9bdf7a91fbc79fc67c228bf0da8219f62465726
child 535175 dfbb67a692f4c1a257edd0b441a84b8c01a8e9c7
push id2082
push userffxbld-merge
push dateMon, 01 Jul 2019 08:34:18 +0000
treeherdermozilla-release@2fb19d0466d2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbaku
bugs1550364
milestone68.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 1550364 part 3. Remove unused nsIUDPSocketChild methods. r=baku Differential Revision: https://phabricator.services.mozilla.com/D30446
dom/network/UDPSocketChild.cpp
dom/network/interfaces/nsIUDPSocketChild.idl
--- a/dom/network/UDPSocketChild.cpp
+++ b/dom/network/UDPSocketChild.cpp
@@ -122,41 +122,16 @@ UDPSocketChild::Connect(nsIUDPSocketInte
 
 NS_IMETHODIMP
 UDPSocketChild::Close() {
   SendClose();
   return NS_OK;
 }
 
 NS_IMETHODIMP
-UDPSocketChild::Send(const nsACString& aHost, uint16_t aPort,
-                     const uint8_t* aData, uint32_t aByteLength) {
-  NS_ENSURE_ARG(aData);
-
-  UDPSOCKET_LOG(("%s: %s:%u - %u bytes", __FUNCTION__,
-                 PromiseFlatCString(aHost).get(), aPort, aByteLength));
-  return SendDataInternal(
-      UDPSocketAddr(UDPAddressInfo(nsCString(aHost), aPort)), aData,
-      aByteLength);
-}
-
-NS_IMETHODIMP
-UDPSocketChild::SendWithAddr(nsINetAddr* aAddr, const uint8_t* aData,
-                             uint32_t aByteLength) {
-  NS_ENSURE_ARG(aAddr);
-  NS_ENSURE_ARG(aData);
-
-  NetAddr addr;
-  aAddr->GetNetAddr(&addr);
-
-  UDPSOCKET_LOG(("%s: %u bytes", __FUNCTION__, aByteLength));
-  return SendDataInternal(UDPSocketAddr(addr), aData, aByteLength);
-}
-
-NS_IMETHODIMP
 UDPSocketChild::SendWithAddress(const NetAddr* aAddr, const uint8_t* aData,
                                 uint32_t aByteLength) {
   NS_ENSURE_ARG(aAddr);
   NS_ENSURE_ARG(aData);
 
   UDPSOCKET_LOG(("%s: %u bytes", __FUNCTION__, aByteLength));
   return SendDataInternal(UDPSocketAddr(*aAddr), aData, aByteLength);
 }
--- a/dom/network/interfaces/nsIUDPSocketChild.idl
+++ b/dom/network/interfaces/nsIUDPSocketChild.idl
@@ -35,24 +35,17 @@ interface nsIUDPSocketChild : nsISupport
             in AUTF8String host, in unsigned short port,
             in bool addressReuse, in bool loopback, in uint32_t recvBufferSize,
             in uint32_t sendBufferSize,
             [optional] in nsIEventTarget mainThreadTarget);
 
   // Tell the chrome process to connect the UDP socket to a given remote host and port
   void connect(in nsIUDPSocketInternal socket, in AUTF8String host, in unsigned short port);
 
-  // Tell the chrome process to perform equivalent operations to all following methods
-  void send(in AUTF8String host, in unsigned short port,
-            [const, array, size_is(byteLength)] in uint8_t bytes,
-            in unsigned long byteLength);
-  // Send without DNS query
-  void sendWithAddr(in nsINetAddr addr,
-                    [const, array, size_is(byteLength)] in uint8_t bytes,
-                    in unsigned long byteLength);
+  // Send the given data to the given address.
   [noscript] void sendWithAddress([const] in NetAddrPtr addr,
                                   [const, array, size_is(byteLength)] in uint8_t bytes,
                                   in unsigned long byteLength);
   // Send input stream. This must be a buffered stream implementation.
   void sendBinaryStream(in AUTF8String host, in unsigned short port, in nsIInputStream stream);
 
   void close();
   void joinMulticast(in AUTF8String multicastAddress, in AUTF8String iface);