Backed out changeset d158405da514 (bug 1528352) for perma failing test_udpsocket.js CLOSED TREE
authorCiure Andrei <aciure@mozilla.com>
Thu, 28 Feb 2019 01:58:42 +0200
changeset 519439 cce8077b2174bc21e2ab776a40fbb541635d050c
parent 519438 1b973064ca5778532190fef25d81b75e8cf77281
child 519440 b5f7ff4ca9b58d002c2bebe0a11b529680068b0c
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1528352
milestone67.0a1
backs outd158405da51437dd36d5ce3e946fc1cc6f54ed38
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
Backed out changeset d158405da514 (bug 1528352) for perma failing test_udpsocket.js CLOSED TREE
netwerk/base/nsUDPSocket.cpp
--- a/netwerk/base/nsUDPSocket.cpp
+++ b/netwerk/base/nsUDPSocket.cpp
@@ -265,19 +265,16 @@ void nsUDPSocket::OnMsgAttach() {
   UDPSOCKET_LOG(("nsUDPSocket::OnMsgAttach [this=%p]\n", this));
 
   if (NS_FAILED(mCondition)) return;
 
   mCondition = TryAttach();
 
   // if we hit an error while trying to attach then bail...
   if (NS_FAILED(mCondition)) {
-    UDPSOCKET_LOG(("nsUDPSocket::OnMsgAttach: TryAttach FAILED err=0x%" PRIx32
-                   " [this=%p]\n",
-                   static_cast<uint32_t>(mCondition), this));
     NS_ASSERTION(!mAttached, "should not be attached already");
     OnSocketDetached(mFD);
   }
 }
 
 nsresult nsUDPSocket::TryAttach() {
   nsresult rv;
 
@@ -381,47 +378,37 @@ UDPMessageProxy::GetOutputStream(nsIOutp
 
 }  // anonymous namespace
 
 //-----------------------------------------------------------------------------
 // nsUDPSocket::nsASocketHandler
 //-----------------------------------------------------------------------------
 
 void nsUDPSocket::OnSocketReady(PRFileDesc* fd, int16_t outFlags) {
-  UDPSOCKET_LOG(
-      ("nsUDPSocket::OnSocketReady: flags=%d [this=%p]\n", outFlags, this));
   NS_ASSERTION(NS_SUCCEEDED(mCondition), "oops");
   NS_ASSERTION(mFD == fd, "wrong file descriptor");
   NS_ASSERTION(outFlags != -1, "unexpected timeout condition reached");
 
   if (outFlags & (PR_POLL_HUP | PR_POLL_NVAL)) {
     NS_WARNING("error polling on listening socket");
     mCondition = NS_ERROR_UNEXPECTED;
     return;
   }
 
   PRNetAddr prClientAddr;
-  int32_t count;
+  uint32_t count;
   // Bug 1252755 - use 9216 bytes to allign with nICEr and transportlayer to
   // support the maximum size of jumbo frames
   char buff[9216];
   count = PR_RecvFrom(mFD, buff, sizeof(buff), 0, &prClientAddr,
                       PR_INTERVAL_NO_WAIT);
-  if (count <= 0) {
-    UDPSOCKET_LOG(
-        ("nsUDPSocket::OnSocketReady: PR_RecvFrom returned no data [this=%p]\n",
-         this));
-    return;
-  }
   mByteReadCount += count;
 
   FallibleTArray<uint8_t> data;
   if (!data.AppendElements(buff, count, fallible)) {
-    UDPSOCKET_LOG((
-        "nsUDPSocket::OnSocketReady: AppendElements FAILED [this=%p]\n", this));
     mCondition = NS_ERROR_UNEXPECTED;
     return;
   }
 
   nsCOMPtr<nsIAsyncInputStream> pipeIn;
   nsCOMPtr<nsIAsyncOutputStream> pipeOut;
 
   uint32_t segsize = UDP_PACKET_CHUNK_SIZE;
@@ -445,17 +432,16 @@ void nsUDPSocket::OnSocketReady(PRFileDe
   NetAddr netAddr;
   PRNetAddrToNetAddr(&prClientAddr, &netAddr);
   nsCOMPtr<nsIUDPMessage> message =
       new UDPMessageProxy(&netAddr, pipeOut, data);
   mListener->OnPacketReceived(this, message);
 }
 
 void nsUDPSocket::OnSocketDetached(PRFileDesc* fd) {
-  UDPSOCKET_LOG(("nsUDPSocket::OnSocketDetached [this=%p]\n", this));
   // force a failure condition if none set; maybe the STS is shutting down :-/
   if (NS_SUCCEEDED(mCondition)) mCondition = NS_ERROR_ABORT;
 
   if (mFD) {
     NS_ASSERTION(mFD == fd, "wrong file descriptor");
     CloseSocket();
   }