Bug 1445249 - Part 1 - Remove unused aProcessId parameter when deleting shared memory; r=jld
authorAlex Gaynor <agaynor@mozilla.com>
Tue, 13 Mar 2018 10:07:18 -0400
changeset 464082 d638bedc1a36ae5a1755550266b96b036dad7504
parent 464081 d5912e36b50a0183229d1b93111c1c3fdd49e56e
child 464083 6341884397ca46626be778ebffded8a7e661d970
push id1728
push userjlund@mozilla.com
push dateMon, 18 Jun 2018 21:12:27 +0000
treeherdermozilla-release@c296fde26f5f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjld
bugs1445249
milestone61.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 1445249 - Part 1 - Remove unused aProcessId parameter when deleting shared memory; r=jld MozReview-Commit-ID: Cn0q46Q67hd
ipc/glue/ProtocolUtils.cpp
ipc/glue/Shmem.cpp
ipc/glue/Shmem.h
--- a/ipc/glue/ProtocolUtils.cpp
+++ b/ipc/glue/ProtocolUtils.cpp
@@ -751,17 +751,17 @@ IToplevelProtocol::DestroySharedMemory(S
 {
   Shmem::id_t aId = shmem.Id(Shmem::IHadBetterBeIPDLCodeCallingThis_OtherwiseIAmADoodyhead());
   Shmem::SharedMemory* segment = LookupSharedMemory(aId);
   if (!segment) {
     return false;
   }
 
   Message* descriptor = shmem.UnshareFrom(
-    Shmem::IHadBetterBeIPDLCodeCallingThis_OtherwiseIAmADoodyhead(), OtherPid(), MSG_ROUTING_CONTROL);
+    Shmem::IHadBetterBeIPDLCodeCallingThis_OtherwiseIAmADoodyhead(), MSG_ROUTING_CONTROL);
 
   mShmemMap.Remove(aId);
   Shmem::Dealloc(Shmem::IHadBetterBeIPDLCodeCallingThis_OtherwiseIAmADoodyhead(), segment);
 
   if (!GetIPCChannel()->CanSend()) {
     delete descriptor;
     return true;
   }
--- a/ipc/glue/Shmem.cpp
+++ b/ipc/glue/Shmem.cpp
@@ -482,17 +482,16 @@ Shmem::ShareTo(IHadBetterBeIPDLCodeCalli
   }
   // close the handle to the segment after it is shared
   mSegment->CloseHandle();
   return msg;
 }
 
 IPC::Message*
 Shmem::UnshareFrom(IHadBetterBeIPDLCodeCallingThis_OtherwiseIAmADoodyhead,
-                   base::ProcessId aTargetPid,
                    int32_t routingId)
 {
   AssertInvariants();
   return new ShmemDestroyed(routingId, mId);
 }
 
 void
 IPDLParamTraits<Shmem>::Write(IPC::Message* aMsg, IProtocol* aActor,
--- a/ipc/glue/Shmem.h
+++ b/ipc/glue/Shmem.h
@@ -210,17 +210,16 @@ public:
           int32_t routingId);
 
   // Stop sharing this with |aTargetPid|.  Return an IPC message that
   // contains enough information for the other process to unmap this
   // segment.  Return a new message if successful (owned by the
   // caller), nullptr if not.
   IPC::Message*
   UnshareFrom(IHadBetterBeIPDLCodeCallingThis_OtherwiseIAmADoodyhead,
-              base::ProcessId aTargetPid,
               int32_t routingId);
 
   // Return a SharedMemory instance in this process using the
   // descriptor shared to us by the process that created the
   // underlying OS shmem resource.  The contents of the descriptor
   // depend on the type of SharedMemory that was passed to us.
   static already_AddRefed<SharedMemory>
   OpenExisting(IHadBetterBeIPDLCodeCallingThis_OtherwiseIAmADoodyhead,