Bug 1073342 - Remove non-necessary thread in WifiCertService. r=vchang
authorChuck Lee <chulee@mozilla.com>
Thu, 02 Oct 2014 19:43:48 +0800
changeset 210137 f926c956c3cdefda45099281ddce8ceb60cefe10
parent 210136 dcf3a8f45e6c63d43dbbb524528ccf361e43e154
child 210138 f634aef97d4709ea39d76a786e014191f57837c2
push id27643
push userkwierso@gmail.com
push dateTue, 14 Oct 2014 01:06:38 +0000
treeherdermozilla-central@c7f5a7b46fcd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersvchang
bugs1073342
milestone35.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 1073342 - Remove non-necessary thread in WifiCertService. r=vchang
dom/wifi/WifiCertService.cpp
dom/wifi/WifiCertService.h
--- a/dom/wifi/WifiCertService.cpp
+++ b/dom/wifi/WifiCertService.cpp
@@ -222,36 +222,25 @@ private:
 
 NS_IMPL_ISUPPORTS(WifiCertService, nsIWifiCertService)
 
 NS_IMETHODIMP
 WifiCertService::Start(nsIWifiEventListener* aListener)
 {
   MOZ_ASSERT(aListener);
 
-  nsresult rv = NS_NewThread(getter_AddRefs(mRequestThread));
-  if (NS_FAILED(rv)) {
-    NS_WARNING("Certn't create wifi control thread");
-    Shutdown();
-    return NS_ERROR_FAILURE;
-  }
-
   mListener = aListener;
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 WifiCertService::Shutdown()
 {
   MOZ_ASSERT(NS_IsMainThread());
-  if (mRequestThread) {
-    mRequestThread->Shutdown();
-    mRequestThread = nullptr;
-  }
 
   mListener = nullptr;
 
   return NS_OK;
 }
 
 void
 WifiCertService::DispatchResult(const WifiCertServiceResultOptions& aOptions)
--- a/dom/wifi/WifiCertService.h
+++ b/dom/wifi/WifiCertService.h
@@ -22,16 +22,15 @@ public:
 
   static already_AddRefed<WifiCertService>
   FactoryCreate();
   void DispatchResult(const mozilla::dom::WifiCertServiceResultOptions& aOptions);
 
 private:
   WifiCertService();
   ~WifiCertService();
-  nsCOMPtr<nsIThread> mRequestThread;
   nsCOMPtr<nsIWifiEventListener> mListener;
 };
 
 } // namespce dom
 } // namespace mozilla
 
 #endif // WifiCertService_h