mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 23:02:20 +00:00
Bug 1221540: OS X IPC timeout retry with a longer interval. r=milan
--HG-- extra : commitid : 2p6mF7bRulV
This commit is contained in:
parent
1c5ba02c87
commit
38a0fd26ee
@ -107,6 +107,7 @@ enum {
|
||||
};
|
||||
|
||||
const int kTimeout = 1000;
|
||||
const int kLongTimeout = 60 * kTimeout;
|
||||
|
||||
pid_t gParentPid = 0;
|
||||
|
||||
@ -616,9 +617,15 @@ SharedMemoryBasic::ShareToProcess(base::ProcessId pid,
|
||||
MachReceiveMessage msg;
|
||||
err = ports->mReceiver->WaitForMessage(&msg, kTimeout);
|
||||
if (err != KERN_SUCCESS) {
|
||||
LOG_ERROR("didn't get an id %s %x\n", mach_error_string(err), err);
|
||||
LOG_ERROR("short timeout didn't get an id %s %x\n", mach_error_string(err), err);
|
||||
MOZ_ASSERT(false, "Receiver message short time out");
|
||||
err = ports->mReceiver->WaitForMessage(&msg, kLongTimeout);
|
||||
|
||||
if (err != KERN_SUCCESS) {
|
||||
LOG_ERROR("long timeout didn't get an id %s %x\n", mach_error_string(err), err);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (msg.GetDataLength() != sizeof(SharePortsReply)) {
|
||||
LOG_ERROR("Improperly formatted reply\n");
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user