mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
Bug 1012639 - Fix OtherProcess sometimes being the current process handle. r=bent
This commit is contained in:
parent
baf27cdb55
commit
5c57498fbc
@ -623,6 +623,11 @@ Shmem::ShareTo(IHadBetterBeIPDLCodeCallingThis_OtherwiseIAmADoodyhead,
|
||||
{
|
||||
AssertInvariants();
|
||||
|
||||
// kInvalidProcessHandle is used to indicate that it's the same process.
|
||||
if (aProcess == kInvalidProcessHandle) {
|
||||
aProcess = base::GetCurrentProcessHandle();
|
||||
}
|
||||
|
||||
if (SharedMemory::TYPE_BASIC == mSegment->Type()) {
|
||||
SharedMemoryBasic* seg = static_cast<SharedMemoryBasic*>(mSegment);
|
||||
SharedMemoryBasic::Handle handle;
|
||||
|
@ -2961,7 +2961,7 @@ class _GenerateProtocolActorCode(ipdl.ast.Visitor):
|
||||
ret=Type.BOOL))
|
||||
|
||||
openmeth.addstmts([
|
||||
StmtExpr(ExprAssn(p.otherProcessVar(), ExprCall(ExprVar('base::GetCurrentProcessHandle')))),
|
||||
StmtExpr(ExprAssn(p.otherProcessVar(), ExprVar('ipc::kInvalidProcessHandle'))),
|
||||
StmtReturn(ExprCall(ExprSelect(p.channelVar(), '.', 'Open'),
|
||||
[ aChannel, aMessageLoop, sidevar ]))
|
||||
])
|
||||
|
Loading…
Reference in New Issue
Block a user