Chromium Code Reviews| Index: common/mac/MachIPC.mm |
| =================================================================== |
| --- common/mac/MachIPC.mm (revision 902) |
| +++ common/mac/MachIPC.mm (working copy) |
| @@ -181,15 +181,14 @@ |
| if (init_result_ != KERN_SUCCESS) |
| return; |
| - mach_port_t task_bootstrap_port = 0; |
| - init_result_ = task_get_bootstrap_port(current_task, &task_bootstrap_port); |
| - |
| - if (init_result_ != KERN_SUCCESS) |
| - return; |
| - |
| - init_result_ = bootstrap_register(bootstrap_port, |
| - const_cast<char*>(receive_port_name), |
| - port_); |
| + // Without |NSMachPortDeallocateNone|, the NSMachPort seems to deallocate |
| + // receive rights on port when it is eventually released. It is not necessary |
| + // to deallocate any rights here as |port_| is fully deallocated in the |
| + // ReceivePort destructor. |
| + NSPort *ns_port = [NSMachPort portWithMachPort:port_ |
| + options:NSMachPortDeallocateNone]; |
| + NSString *port_name = [NSString stringWithUTF8String:receive_port_name]; |
| + [[NSMachBootstrapServer sharedInstance] registerPort:ns_port name:port_name]; |
|
Mark Mentovai
2012/01/26 14:27:40
Rather than doing this Cocoa stuff, bpoop uses the
Nico
2012/01/26 18:07:39
If breakpad doesn't care about -Wdeprecated-declar
|
| } |
| //============================================================================== |