Bug 1299594 - part 3 - remove gProtocolMutex; r=billm
authorNathan Froyd <froydnj@gmail.com>
Fri, 02 Sep 2016 16:13:50 -0400
changeset 312384 47f3a6275d66fe0a7d88cba05e375011be35b6c8
parent 312383 67e8b862bdb08431c362d3f5e1cbb6a0cfbe3a13
child 312385 1477881ee551854e3b136225083e8d85a41aca38
push id81365
push usernfroyd@mozilla.com
push dateFri, 02 Sep 2016 12:15:56 +0000
treeherdermozilla-inbound@47f3a6275d66 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbillm
bugs1299594
milestone51.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 1299594 - part 3 - remove gProtocolMutex; r=billm It no longer protects any global state, and is therefore pure overhead.
ipc/glue/ProtocolUtils.cpp
--- a/ipc/glue/ProtocolUtils.cpp
+++ b/ipc/glue/ProtocolUtils.cpp
@@ -59,27 +59,23 @@ ProtocolCloneContext::ProtocolCloneConte
 ProtocolCloneContext::~ProtocolCloneContext()
 {}
 
 void ProtocolCloneContext::SetContentParent(ContentParent* aContentParent)
 {
   mContentParent = aContentParent;
 }
 
-static StaticMutex gProtocolMutex;
-
 IToplevelProtocol::IToplevelProtocol(ProtocolId aProtoId)
  : mProtocolId(aProtoId)
 {
 }
 
 IToplevelProtocol::~IToplevelProtocol()
 {
-  StaticMutexAutoLock al(gProtocolMutex);
-
   if (mTrans) {
     RefPtr<DeleteTask<Transport>> task = new DeleteTask<Transport>(mTrans.release());
     XRE_GetIOMessageLoop()->PostTask(task.forget());
   }
 }
 
 class ChannelOpened : public IPC::Message
 {