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

Unified Diff: util/mach/exc_server_variants.cc

Issue 781823002: Add CompositeMachMessageServer and its test (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.h ('k') | util/mach/exc_server_variants_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: util/mach/exc_server_variants.cc
diff --git a/util/mach/exc_server_variants.cc b/util/mach/exc_server_variants.cc
index 0376e600a905b1677d71773e142369b716ef6618..7dbe553f3a5e75d4d5a9ffc86fb0d310941a6f4f 100644
--- a/util/mach/exc_server_variants.cc
+++ b/util/mach/exc_server_variants.cc
@@ -318,6 +318,16 @@ bool ExcServer::MachMessageServerFunction(const mach_msg_header_t* in_header,
return false;
}
+std::set<mach_msg_id_t> ExcServer::MachMessageServerRequestIDs() {
+ const mach_msg_id_t request_ids[] = {
+ kMachMessageIDExceptionRaise,
+ kMachMessageIDExceptionRaiseState,
+ kMachMessageIDExceptionRaiseStateIdentity
+ };
+ return std::set<mach_msg_id_t>(
+ &request_ids[0], &request_ids[arraysize(request_ids)]);
+}
+
mach_msg_size_t ExcServer::MachMessageServerRequestSize() {
return sizeof(__RequestUnion__exc_subsystem);
}
@@ -459,6 +469,16 @@ bool MachExcServer::MachMessageServerFunction(
return false;
}
+std::set<mach_msg_id_t> MachExcServer::MachMessageServerRequestIDs() {
+ const mach_msg_id_t request_ids[] = {
+ kMachMessageIDMachExceptionRaise,
+ kMachMessageIDMachExceptionRaiseState,
+ kMachMessageIDMachExceptionRaiseStateIdentity
+ };
+ return std::set<mach_msg_id_t>(
+ &request_ids[0], &request_ids[arraysize(request_ids)]);
+}
+
mach_msg_size_t MachExcServer::MachMessageServerRequestSize() {
return sizeof(__RequestUnion__mach_exc_subsystem);
}
@@ -689,6 +709,17 @@ bool UniversalMachExcServer::MachMessageServerFunction(
return false;
}
+std::set<mach_msg_id_t> UniversalMachExcServer::MachMessageServerRequestIDs() {
+ std::set<mach_msg_id_t> request_ids =
+ exc_server_.MachMessageServerRequestIDs();
+
+ std::set<mach_msg_id_t> mach_exc_request_ids =
+ mach_exc_server_.MachMessageServerRequestIDs();
+ request_ids.insert(mach_exc_request_ids.begin(), mach_exc_request_ids.end());
+
+ return request_ids;
+}
+
mach_msg_size_t UniversalMachExcServer::MachMessageServerRequestSize() {
return std::max(mach_exc_server_.MachMessageServerRequestSize(),
exc_server_.MachMessageServerRequestSize());
« no previous file with comments | « util/mach/exc_server_variants.h ('k') | util/mach/exc_server_variants_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698