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

Unified Diff: base/process/launch_mac.cc

Issue 1346923006: Refactor the bootstrap sandbox process launching integration. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: RevokeToken Created 5 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 | « base/process/launch.h ('k') | base/process/launch_posix.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/process/launch_mac.cc
diff --git a/base/process/launch_mac.cc b/base/process/launch_mac.cc
index 86cd0a2995397ce05fb719dda39bb1d7c99d3873..5895eae43513bde7146cecae08b552881194c6f5 100644
--- a/base/process/launch_mac.cc
+++ b/base/process/launch_mac.cc
@@ -28,32 +28,4 @@ void RestoreDefaultExceptionHandler() {
EXCEPTION_DEFAULT, THREAD_STATE_NONE);
}
-void ReplaceBootstrapPort(const std::string& new_bootstrap_name) {
- // This function is called between fork() and exec(), so it should take care
- // to run properly in that situation.
-
- mach_port_t port = MACH_PORT_NULL;
- kern_return_t kr = bootstrap_look_up(bootstrap_port,
- new_bootstrap_name.c_str(), &port);
- if (kr != KERN_SUCCESS) {
- RAW_LOG(FATAL, "Failed to look up replacement bootstrap port.");
- }
-
- kr = task_set_bootstrap_port(mach_task_self(), port);
- if (kr != KERN_SUCCESS) {
- RAW_LOG(FATAL, "Failed to replace bootstrap port.");
- }
-
- // On OS X 10.10 and higher, libxpc uses the port stash to transfer the
- // XPC root port. This is effectively the same connection as the Mach
- // bootstrap port, but not transferred using the task special port.
- // Therefore, stash the replacement bootstrap port, so that on 10.10 it
- // will be retrieved by the XPC code and used as a replacement for the
- // XPC root port as well.
- kr = mach_ports_register(mach_task_self(), &port, 1);
- if (kr != KERN_SUCCESS) {
- RAW_LOG(ERROR, "Failed to register replacement bootstrap port.");
- }
-}
-
} // namespace base
« no previous file with comments | « base/process/launch.h ('k') | base/process/launch_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698