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

Unified Diff: util/mach/exception_ports_test.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 | « util/mach/exc_server_variants_test.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: util/mach/exception_ports_test.cc
diff --git a/util/mach/exception_ports_test.cc b/util/mach/exception_ports_test.cc
index 24b16488a55ba95a62cc69e5751ad21d70c518b0..70d05445ca6a8f8f08d7f066fcd6520c6076c36e 100644
--- a/util/mach/exception_ports_test.cc
+++ b/util/mach/exception_ports_test.cc
@@ -102,8 +102,8 @@ void TestGetExceptionPorts(const ExceptionPorts& exception_ports,
}
}
-class TestExceptionPorts : public UniversalMachExcServer,
- public MachMultiprocess {
+class TestExceptionPorts : public MachMultiprocess,
+ public UniversalMachExcServer::Interface {
public:
// Where to call ExceptionPorts::SetExceptionPort() from.
enum SetType {
@@ -128,8 +128,8 @@ class TestExceptionPorts : public UniversalMachExcServer,
};
TestExceptionPorts(SetType set_type, SetOn set_on, WhoCrashes who_crashes)
- : UniversalMachExcServer(),
- MachMultiprocess(),
+ : MachMultiprocess(),
+ UniversalMachExcServer::Interface(),
set_type_(set_type),
set_on_(set_on),
who_crashes_(who_crashes),
@@ -139,7 +139,7 @@ class TestExceptionPorts : public UniversalMachExcServer,
SetOn set_on() const { return set_on_; }
WhoCrashes who_crashes() const { return who_crashes_; }
- // UniversalMachExcServer:
+ // UniversalMachExcServer::Interface:
virtual kern_return_t CatchMachException(
exception_behavior_t behavior,
@@ -443,8 +443,10 @@ class TestExceptionPorts : public UniversalMachExcServer,
CheckedWriteFD(WritePipeFD(), &c, 1);
if (who_crashes_ != kNobodyCrashes) {
+ UniversalMachExcServer universal_mach_exc_server(this);
+
kern_return_t kr =
- MachMessageServer::Run(this,
+ MachMessageServer::Run(&universal_mach_exc_server,
local_port,
MACH_MSG_OPTION_NONE,
MachMessageServer::kOneShot,
« no previous file with comments | « util/mach/exc_server_variants_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698