Bug 1323100 - Use NS_NewNamedThread for the Wifi Monitor thread. r?froydnj
MozReview-Commit-ID: 25lwf8WdANT
--- a/netwerk/wifi/nsWifiMonitor.cpp
+++ b/netwerk/wifi/nsWifiMonitor.cpp
@@ -79,17 +79,17 @@ NS_IMETHODIMP nsWifiMonitor::StartWatchi
// but if DoScan returns with an error before shutdown (i.e. !mKeepGoing)
// then we will respawn the thread.
LOG(("nsWifiMonitor::StartWatching %p restarting thread\n", this));
mThreadComplete = false;
mThread = nullptr;
}
if (!mThread) {
- rv = NS_NewThread(getter_AddRefs(mThread), this);
+ rv = NS_NewNamedThread("Wifi Monitor", getter_AddRefs(mThread), this);
if (NS_FAILED(rv))
return rv;
}
mListeners.AppendElement(nsWifiListener(new nsMainThreadPtrHolder<nsIWifiListener>(aListener)));
// tell ourselves that we have a new watcher.
@@ -150,18 +150,16 @@ NS_IMETHODIMP nsPassErrorToWifiListeners
}
return NS_OK;
}
NS_IMETHODIMP nsWifiMonitor::Run()
{
LOG(("@@@@@ wifi monitor run called\n"));
- PR_SetCurrentThreadName("Wifi Monitor");
-
nsresult rv = DoScan();
LOG(("@@@@@ wifi monitor run::doscan complete %x\n", rv));
nsAutoPtr<WifiListenerArray> currentListeners;
bool doError = false;
{
ReentrantMonitorAutoEnter mon(mReentrantMonitor);