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

Unified Diff: util/mach/mach_message_server.cc

Issue 555663002: Enhance the MachMessageServer test to cover port right ownership management (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Created 6 years, 3 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 | « no previous file | util/mach/mach_message_server_test.cc » ('j') | util/mach/mach_message_server_test.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: util/mach/mach_message_server.cc
diff --git a/util/mach/mach_message_server.cc b/util/mach/mach_message_server.cc
index dfaaa9742485be5fba5f5750425d4eece73f777d..98e41041750b0310ab1f01da7e75eec1e45f30f6 100644
--- a/util/mach/mach_message_server.cc
+++ b/util/mach/mach_message_server.cc
@@ -206,6 +206,12 @@ mach_msg_return_t MachMessageServer::Run(Interface* interface,
request_header, reply_header, &destroy_complex_request);
if (!(reply_header->msgh_bits & MACH_MSGH_BITS_COMPLEX)) {
+ // This only works if the reply message is not complex, because otherwise,
+ // the location of the RetCode field is not known. It should be possible
+ // to locate the RetCode field by looking beyond the descriptors in a
+ // complex reply message, but this is not currently done. This behavior
+ // has not proven itself necessary in practice, and it’s not done by
+ // mach_msg_server() or mach_msg_server_once() either.
mig_reply_error_t* reply_mig =
reinterpret_cast<mig_reply_error_t*>(reply_header);
if (reply_mig->RetCode == MIG_NO_REPLY) {
« no previous file with comments | « no previous file | util/mach/mach_message_server_test.cc » ('j') | util/mach/mach_message_server_test.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698