Bug 1323100 - Stop double-registering the Socket Transport thread. r?froydnj draft
authorMarkus Stange <mstange@themasta.com>
Wed, 21 Dec 2016 17:57:07 +0100
changeset 456888 eed035cb94dbbe2d31341c45250cfd41b9e5d9bf
parent 456887 538c90d86790431b7b96d99a7a32b317c7cc86d0
child 456889 10f61a87b59e49c8cbcd3028d7839f5fddd7b0fc
push id40636
push userbmo:mstange@themasta.com
push dateFri, 06 Jan 2017 12:38:48 +0000
reviewersfroydnj
bugs1323100
milestone53.0a1
Bug 1323100 - Stop double-registering the Socket Transport thread. r?froydnj MozReview-Commit-ID: 7YEC79PwUGg
netwerk/base/nsSocketTransportService2.cpp
--- a/netwerk/base/nsSocketTransportService2.cpp
+++ b/netwerk/base/nsSocketTransportService2.cpp
@@ -828,21 +828,16 @@ void
 nsSocketTransportService::MarkTheLastElementOfPendingQueue()
 {
     mServingPendingQueue = false;
 }
 
 NS_IMETHODIMP
 nsSocketTransportService::Run()
 {
-#ifdef MOZ_ENABLE_PROFILER_SPS
-    char stackBaseGuess; // Need to be the first variable of main loop function.
-    profiler_register_thread(PR_GetThreadName(PR_GetCurrentThread()), &stackBaseGuess);
-#endif // MOZ_ENABLE_PROFILER_SPS
-
     SOCKET_LOG(("STS thread init %d sockets\n", gMaxCount));
 
     psm::InitializeSSLServerCertVerificationThreads();
 
     gSocketThread = PR_GetCurrentThread();
 
     {
         MutexAutoLock lock(mLock);
@@ -1014,20 +1009,16 @@ nsSocketTransportService::Run()
     NS_ProcessPendingEvents(mRawThread);
 
     gSocketThread = nullptr;
 
     psm::StopSSLServerCertVerificationThreads();
 
     SOCKET_LOG(("STS thread exit\n"));
 
-#ifdef MOZ_ENABLE_PROFILER_SPS
-    profiler_unregister_thread();
-#endif // MOZ_ENABLE_PROFILER_SPS
-
     return NS_OK;
 }
 
 void
 nsSocketTransportService::DetachSocketWithGuard(bool aGuardLocals,
                                                 SocketContext *socketList,
                                                 int32_t index)
 {