Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(33)

Unified Diff: common/mac/MachIPC.mm

Issue 9234054: Fix several clang warnings in breakpad. (Closed) Base URL: http://google-breakpad.googlecode.com/svn/trunk/src/
Patch Set: . Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « client/mac/sender/uploader.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
}
//==============================================================================
« no previous file with comments | « client/mac/sender/uploader.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698