Bug 1299594 - part 3 - remove gProtocolMutex; r=billm
authorNathan Froyd <froydnj@gmail.com>
Fri, 02 Sep 2016 16:13:50 -0400
changeset 312410 47f3a6275d66fe0a7d88cba05e375011be35b6c8
parent 312409 67e8b862bdb08431c362d3f5e1cbb6a0cfbe3a13
child 312411 1477881ee551854e3b136225083e8d85a41aca38
push id20447
push userkwierso@gmail.com
push dateFri, 02 Sep 2016 20:36:44 +0000
treeherderfx-team@969397f22187 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbillm
bugs1299594
milestone51.0a1
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
 {