From a622ff73041a35c4c9a9cbc19f040f9c8e021ad5 Mon Sep 17 00:00:00 2001 From: Henry Chang Date: Fri, 21 Nov 2014 15:46:04 +0800 Subject: [PATCH] Bug 1098192 - Remove unused mutex for ifc_* function calls. r=vchang --- dom/network/NetUtils.cpp | 11 ----------- dom/network/NetUtils.h | 4 ---- 2 files changed, 15 deletions(-) diff --git a/dom/network/NetUtils.cpp b/dom/network/NetUtils.cpp index 40ce44812f7..5bb215f5018 100644 --- a/dom/network/NetUtils.cpp +++ b/dom/network/NetUtils.cpp @@ -28,8 +28,6 @@ GetNetUtilsLibHandle() return sNetUtilsLib; } -mozilla::Mutex NetUtils::sIfcMutex("NetUtils::sIfcMutex"); - // static void* NetUtils::GetSharedLibrary() @@ -70,14 +68,12 @@ NetUtils::NetUtils() int32_t NetUtils::do_ifc_enable(const char *ifname) { USE_DLFUNC(ifc_enable) - mozilla::MutexAutoLock lock(sIfcMutex); return ifc_enable(ifname); } int32_t NetUtils::do_ifc_disable(const char *ifname) { USE_DLFUNC(ifc_disable) - mozilla::MutexAutoLock lock(sIfcMutex); return ifc_disable(ifname); } @@ -89,7 +85,6 @@ int32_t NetUtils::do_ifc_configure(const char *ifname, in_addr_t dns2) { USE_DLFUNC(ifc_configure) - mozilla::MutexAutoLock lock(sIfcMutex); int32_t ret = ifc_configure(ifname, address, prefixLength, gateway, dns1, dns2); return ret; } @@ -98,7 +93,6 @@ int32_t NetUtils::do_ifc_reset_connections(const char *ifname, const int32_t resetMask) { USE_DLFUNC(ifc_reset_connections) - mozilla::MutexAutoLock lock(sIfcMutex); return ifc_reset_connections(ifname, resetMask); } @@ -106,7 +100,6 @@ int32_t NetUtils::do_ifc_set_default_route(const char *ifname, in_addr_t gateway) { USE_DLFUNC(ifc_set_default_route) - mozilla::MutexAutoLock lock(sIfcMutex); return ifc_set_default_route(ifname, gateway); } @@ -116,7 +109,6 @@ int32_t NetUtils::do_ifc_add_route(const char *ifname, const char *gateway) { USE_DLFUNC(ifc_add_route) - mozilla::MutexAutoLock lock(sIfcMutex); return ifc_add_route(ifname, dst, prefixLength, gateway); } @@ -126,21 +118,18 @@ int32_t NetUtils::do_ifc_remove_route(const char *ifname, const char *gateway) { USE_DLFUNC(ifc_remove_route) - mozilla::MutexAutoLock lock(sIfcMutex); return ifc_remove_route(ifname, dst, prefixLength, gateway); } int32_t NetUtils::do_ifc_remove_host_routes(const char *ifname) { USE_DLFUNC(ifc_remove_host_routes) - mozilla::MutexAutoLock lock(sIfcMutex); return ifc_remove_host_routes(ifname); } int32_t NetUtils::do_ifc_remove_default_route(const char *ifname) { USE_DLFUNC(ifc_remove_default_route) - mozilla::MutexAutoLock lock(sIfcMutex); return ifc_remove_default_route(ifname); } diff --git a/dom/network/NetUtils.h b/dom/network/NetUtils.h index d032c36b6c0..6ae2894ab12 100644 --- a/dom/network/NetUtils.h +++ b/dom/network/NetUtils.h @@ -11,7 +11,6 @@ #define NetUtils_h #include "arpa/inet.h" -#include "mozilla/Mutex.h" // Copied from ifc.h #define RESET_IPV4_ADDRESSES 0x01 @@ -59,9 +58,6 @@ public: char* vendorinfo); static int32_t SdkVersion(); - -private: - static mozilla::Mutex sIfcMutex; }; // Defines a function type with the right arguments and return type.