Bug 901805 - Report network activity in nsUDPServerSocket. r=honzab
authorShih-Chiang Chien <schien@mozilla.com>
Tue, 17 Sep 2013 16:07:06 -0400
changeset 161356 76488552d101cbf9660a95fce796f9ae0367c1f8
parent 161355 7b518ccbf1eeaa5d2ffb891fdc6ff60fc4e47043
child 161357 96ffffd217f93c65b8f565669298e850c0685509
push id3066
push userakeybl@mozilla.com
push dateMon, 09 Dec 2013 19:58:46 +0000
treeherdermozilla-beta@a31a0dce83aa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewershonzab
bugs901805
milestone27.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 901805 - Report network activity in nsUDPServerSocket. r=honzab
netwerk/base/src/nsUDPServerSocket.cpp
--- a/netwerk/base/src/nsUDPServerSocket.cpp
+++ b/netwerk/base/src/nsUDPServerSocket.cpp
@@ -10,16 +10,17 @@
 #include "nsAutoPtr.h"
 #include "nsError.h"
 #include "nsNetCID.h"
 #include "prnetdb.h"
 #include "prio.h"
 #include "mozilla/Attributes.h"
 #include "nsNetAddr.h"
 #include "nsNetSegmentUtils.h"
+#include "NetworkActivityMonitor.h"
 #include "nsStreamUtils.h"
 #include "nsIPipe.h"
 #include "prerror.h"
 #include "nsINSSErrorsService.h"
 
 using namespace mozilla::net;
 using namespace mozilla;
 
@@ -449,16 +450,19 @@ nsUDPServerSocket::InitWithAddress(const
   if (PR_GetSockName(mFD, &addr) != PR_SUCCESS)
   {
     NS_WARNING("cannot get socket name");
     goto fail;
   }
 
   PRNetAddrToNetAddr(&addr, &mAddr);
 
+  // create proxy via NetworkActivityMonitor
+  NetworkActivityMonitor::AttachIOLayer(mFD);
+
   // wait until AsyncListen is called before polling the socket for
   // client connections.
   return NS_OK;
 
 fail:
   Close();
   return NS_ERROR_FAILURE;
 }