Bug 1323100 - Stop double-registering the Socket Transport thread. r?froydnj
MozReview-Commit-ID: 7YEC79PwUGg
--- 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)
{