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

Unified Diff: util/mach/mach_message_server.h

Issue 564533002: MachMessageServer: Make request messages const (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
Index: util/mach/mach_message_server.h
diff --git a/util/mach/mach_message_server.h b/util/mach/mach_message_server.h
index 3b08a55d577c399e31c480029958245a8c67e044..855667d487d9f5291ffccc4089343f4a22045546 100644
--- a/util/mach/mach_message_server.h
+++ b/util/mach/mach_message_server.h
@@ -37,7 +37,9 @@ class MachMessageServer {
//! may call such a function directly. This method is expected to behave
//! exactly as these functions behave.
//!
- //! \param[in] in The request message, received as a Mach message.
+ //! \param[in] in The request message, received as a Mach message. Note that
+ //! this interface uses a `const` parameter for this purpose, whereas
+ //! MIG-generated “demux” functions do not.
//! \param[out] out The reply message. The caller allocates storage, and the
//! callee is expected to populate the reply message appropriately.
//! After returning, the caller will send this reply as a Mach message
@@ -62,7 +64,7 @@ class MachMessageServer {
//! the reply message should be set as `mig_reply_error_t::RetCode`. The
//! non-`void` return value is used for increased compatibility with
//! MIG-generated functions.
- virtual bool MachMessageServerFunction(mach_msg_header_t* in,
+ virtual bool MachMessageServerFunction(const mach_msg_header_t* in,
mach_msg_header_t* out,
bool* destroy_complex_request) = 0;

Powered by Google App Engine
This is Rietveld 408576698