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

Unified Diff: tools/mac/catch_exception_tool.cc

Issue 1383283003: Add and use scoped-right-returning wrappers for Mach bootstrap routines (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Self-review Created 5 years, 2 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
Index: tools/mac/catch_exception_tool.cc
diff --git a/tools/mac/catch_exception_tool.cc b/tools/mac/catch_exception_tool.cc
index 902010be57d8243602091cbc5d8aa5ac5488bdb5..b70ce0a5b45cb4d6a48308d17dce01a9d260fd34 100644
--- a/tools/mac/catch_exception_tool.cc
+++ b/tools/mac/catch_exception_tool.cc
@@ -14,7 +14,6 @@
#include <getopt.h>
#include <libgen.h>
-#include <servers/bootstrap.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
@@ -263,11 +262,9 @@ int CatchExceptionToolMain(int argc, char* argv[]) {
return EXIT_FAILURE;
}
- mach_port_t service_port;
- kern_return_t kr = bootstrap_check_in(
- bootstrap_port, options.mach_service.c_str(), &service_port);
- if (kr != BOOTSTRAP_SUCCESS) {
- BOOTSTRAP_LOG(ERROR, kr) << "bootstrap_check_in " << options.mach_service;
+ base::mac::ScopedMachReceiveRight
+ service_port(BootstrapCheckIn(options.mach_service));
+ if (service_port == kMachPortNull) {
return EXIT_FAILURE;
}

Powered by Google App Engine
This is Rietveld 408576698