зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1012639 - Fix OtherProcess sometimes being the current process handle. r=bent
This commit is contained in:
Родитель
baf27cdb55
Коммит
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 ]))
|
||||
])
|
||||
|
|
Загрузка…
Ссылка в новой задаче