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

Unified Diff: sandbox/mac/launchd_interception_server.h

Issue 306123012: Do not double-unref send rights when using POLICY_SUBSTITUE_PORT. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Adjust comment Created 6 years, 7 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 | « sandbox/mac/bootstrap_sandbox_unittest.mm ('k') | sandbox/mac/launchd_interception_server.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/mac/launchd_interception_server.h
diff --git a/sandbox/mac/launchd_interception_server.h b/sandbox/mac/launchd_interception_server.h
index 6b92e9fa47ab04ecc570a01522478ed263e44e1f..117653345ee3c06bc39142d9335cc6423227804d 100644
--- a/sandbox/mac/launchd_interception_server.h
+++ b/sandbox/mac/launchd_interception_server.h
@@ -54,8 +54,8 @@ class LaunchdInterceptionServer {
mach_msg_header_t* reply,
pid_t sender_pid);
- // Sends a reply message.
- void SendReply(mach_msg_header_t* reply);
+ // Sends a reply message. Returns true if the message was sent successfully.
+ bool SendReply(mach_msg_header_t* reply);
// Forwards the original |request| on to real bootstrap server for handling.
void ForwardMessage(mach_msg_header_t* request, mach_msg_header_t* reply);
@@ -88,6 +88,9 @@ class LaunchdInterceptionServer {
// The Mach port handed out in reply to denied look up requests. All denied
// requests share the same port, though nothing reads messages from it.
base::mac::ScopedMachReceiveRight sandbox_port_;
+ // The send right for the above |sandbox_port_|, used with
+ // MACH_MSG_TYPE_COPY_SEND when handing out references to the dummy port.
+ base::mac::ScopedMachSendRight sandbox_send_port_;
// The compatibility shim that handles differences in message header IDs and
// request/reply structures between different OS X versions.
« no previous file with comments | « sandbox/mac/bootstrap_sandbox_unittest.mm ('k') | sandbox/mac/launchd_interception_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698