Bug 1323100 - Use NS_NewNamedThread for the Link Monitor thread. r?froydnj draft
authorMarkus Stange <mstange@themasta.com>
Wed, 21 Dec 2016 11:32:39 +0100
changeset 456871 a0e25a9f0ce024e53bc839491ab266800596d800
parent 456870 77cbebe3a799f0c107622268fe12ade97460c4e9
child 456872 11afdcc39701c62088729ea0975325ecb2af7eab
push id40636
push userbmo:mstange@themasta.com
push dateFri, 06 Jan 2017 12:38:48 +0000
reviewersfroydnj
bugs1323100
milestone53.0a1
Bug 1323100 - Use NS_NewNamedThread for the Link Monitor thread. r?froydnj MozReview-Commit-ID: ETOGkxMgknN
netwerk/system/win32/nsNotifyAddrListener.cpp
--- a/netwerk/system/win32/nsNotifyAddrListener.cpp
+++ b/netwerk/system/win32/nsNotifyAddrListener.cpp
@@ -318,18 +318,16 @@ nsNotifyAddrListener::nextCoalesceWaitTi
         return static_cast<DWORD>
             (kNetworkChangeCoalescingPeriod - period);
     }
 }
 
 NS_IMETHODIMP
 nsNotifyAddrListener::Run()
 {
-    PR_SetCurrentThreadName("Link Monitor");
-
     mStartTime = TimeStamp::Now();
 
     calculateNetworkId();
 
     DWORD waitTime = INFINITE;
 
     if (!sNotifyIpInterfaceChange || !sCancelMibChangeNotify2 || !mIPv6Changes) {
         // For Windows versions which are older than Vista which lack
@@ -416,17 +414,17 @@ nsNotifyAddrListener::Init(void)
     Preferences::AddBoolVarCache(&mAllowChangedEvent,
                                  NETWORK_NOTIFY_CHANGED_PREF, true);
     Preferences::AddBoolVarCache(&mIPv6Changes,
                                  NETWORK_NOTIFY_IPV6_PREF, false);
 
     mCheckEvent = CreateEvent(nullptr, FALSE, FALSE, nullptr);
     NS_ENSURE_TRUE(mCheckEvent, NS_ERROR_OUT_OF_MEMORY);
 
-    rv = NS_NewThread(getter_AddRefs(mThread), this);
+    rv = NS_NewNamedThread("Link Monitor", getter_AddRefs(mThread), this);
     NS_ENSURE_SUCCESS(rv, rv);
 
     return NS_OK;
 }
 
 nsresult
 nsNotifyAddrListener::Shutdown(void)
 {