Bug 1445249 - Part 1 - Remove unused aProcessId parameter when deleting shared memory; r?jld
MozReview-Commit-ID: Cn0q46Q67hd
--- 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,