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

Unified Diff: tools/catch_exception_tool.cc

Issue 775943005: UniversalMachExcServer: eliminate multiple implementation inheritance (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Created 6 years 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 | « snapshot/mac/mach_o_image_annotations_reader_test.cc ('k') | util/mach/exc_client_variants_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/catch_exception_tool.cc
diff --git a/tools/catch_exception_tool.cc b/tools/catch_exception_tool.cc
index 3fcc221640d945bc043b2b37dcc1cc85d58da6b5..a753fda20fa2dc9b10f5b0ab3c88d101dece78da 100644
--- a/tools/catch_exception_tool.cc
+++ b/tools/catch_exception_tool.cc
@@ -47,16 +47,17 @@ struct Options {
MachMessageServer::Persistent persistent;
};
-class ExceptionServer : public UniversalMachExcServer {
+class ExceptionServer : public UniversalMachExcServer::Interface {
public:
ExceptionServer(const Options& options,
const std::string& me,
int* exceptions_handled)
- : UniversalMachExcServer(),
+ : UniversalMachExcServer::Interface(),
options_(options),
me_(me),
exceptions_handled_(exceptions_handled) {}
+ // UniversalMachExcServer::Interface:
virtual kern_return_t CatchMachException(
exception_behavior_t behavior,
exception_handler_t exception_port,
@@ -275,6 +276,7 @@ int CatchExceptionToolMain(int argc, char* argv[]) {
int exceptions_handled = 0;
ExceptionServer exception_server(options, me, &exceptions_handled);
+ UniversalMachExcServer universal_mach_exc_server(&exception_server);
// Assume that if persistent mode has been requested, it’s desirable to ignore
// large messages and keep running.
@@ -287,7 +289,7 @@ int CatchExceptionToolMain(int argc, char* argv[]) {
? options.timeout_secs * 1000
: MACH_MSG_TIMEOUT_NONE;
- mach_msg_return_t mr = MachMessageServer::Run(&exception_server,
+ mach_msg_return_t mr = MachMessageServer::Run(&universal_mach_exc_server,
service_port,
MACH_MSG_OPTION_NONE,
options.persistent,
« no previous file with comments | « snapshot/mac/mach_o_image_annotations_reader_test.cc ('k') | util/mach/exc_client_variants_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698