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

Unified Diff: handler/mac/exception_handler_server.cc

Issue 1409073013: mac: Make crashpad_handler get its receive right from its client (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: 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
« no previous file with comments | « handler/mac/exception_handler_server.h ('k') | handler/main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: handler/mac/exception_handler_server.cc
diff --git a/handler/mac/exception_handler_server.cc b/handler/mac/exception_handler_server.cc
index 52da8faac9429fed9b53aa55d8ddbea2dc114994..400df5624f6317299d79622406ee216374505e20 100644
--- a/handler/mac/exception_handler_server.cc
+++ b/handler/mac/exception_handler_server.cc
@@ -125,7 +125,7 @@ class ExceptionHandlerServerRun : public UniversalMachExcServer::Interface,
bool* destroy_complex_request) override {
if (exception_port != exception_port_) {
LOG(WARNING) << "exception port mismatch";
- return MIG_BAD_ID;
+ return KERN_FAILURE;
}
return exception_interface_->CatchMachException(behavior,
@@ -172,7 +172,7 @@ class ExceptionHandlerServerRun : public UniversalMachExcServer::Interface,
// to craft and send a no-senders notification via its exception port, and
// cause the handler to stop processing exceptions and exit.
LOG(WARNING) << "notify port mismatch";
- return MIG_BAD_ID;
+ return KERN_FAILURE;
}
running_ = false;
@@ -199,11 +199,11 @@ class ExceptionHandlerServerRun : public UniversalMachExcServer::Interface,
// called.
if (notify != notify_port_) {
LOG(WARNING) << "notify port mismatch";
- return MIG_BAD_ID;
+ return KERN_FAILURE;
}
NOTREACHED();
- return KERN_FAILURE;
+ return MIG_BAD_ID;
}
UniversalMachExcServer mach_exc_server_;
@@ -219,8 +219,9 @@ class ExceptionHandlerServerRun : public UniversalMachExcServer::Interface,
} // namespace
-ExceptionHandlerServer::ExceptionHandlerServer()
- : receive_port_(NewMachPort(MACH_PORT_RIGHT_RECEIVE)) {
+ExceptionHandlerServer::ExceptionHandlerServer(
+ base::mac::ScopedMachReceiveRight receive_port)
+ : receive_port_(receive_port.Pass()) {
CHECK(receive_port_.is_valid());
}
« no previous file with comments | « handler/mac/exception_handler_server.h ('k') | handler/main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698