Bug 1083449 - ifc_enable / ifc_disable needs to be protected as well. r=vchang
authorHenry Chang <hchang@mozilla.com>
Fri, 17 Oct 2014 14:13:14 +0800
changeset 212739 fb989564c63465053290a76522ba2cb7da318bc8
parent 212738 3367517213072f1f61034b27f942c7337e477e1f
child 212740 3ea653e3c95f7a12d685ef2b4c60afc58b8d0f5d
push id51042
push userryanvm@gmail.com
push dateTue, 28 Oct 2014 20:25:03 +0000
treeherdermozilla-inbound@53d84829b2b8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersvchang
bugs1083449
milestone36.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 1083449 - ifc_enable / ifc_disable needs to be protected as well. r=vchang
dom/network/NetUtils.cpp
--- a/dom/network/NetUtils.cpp
+++ b/dom/network/NetUtils.cpp
@@ -64,22 +64,24 @@ DEFINE_DLFUNC(dhcp_stop, int32_t, const 
 NetUtils::NetUtils()
   : mIfcMutex("NetUtils::mIfcMutex")
 {
 }
 
 int32_t NetUtils::do_ifc_enable(const char *ifname)
 {
   USE_DLFUNC(ifc_enable)
+  mozilla::MutexAutoLock lock(mIfcMutex);
   return ifc_enable(ifname);
 }
 
 int32_t NetUtils::do_ifc_disable(const char *ifname)
 {
   USE_DLFUNC(ifc_disable)
+  mozilla::MutexAutoLock lock(mIfcMutex);
   return ifc_disable(ifname);
 }
 
 int32_t NetUtils::do_ifc_configure(const char *ifname,
                                        in_addr_t address,
                                        uint32_t prefixLength,
                                        in_addr_t gateway,
                                        in_addr_t dns1,