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

Unified Diff: chrome/app/chrome_main_mac.h

Issue 8059041: Use bootstrap subset ports to overcome Mach port mapping leaks and -10810 errors (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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: chrome/app/chrome_main_mac.h
===================================================================
--- chrome/app/chrome_main_mac.h (revision 103028)
+++ chrome/app/chrome_main_mac.h (working copy)
@@ -19,4 +19,27 @@
// process.
void SetUpBundleOverrides();
+// Creates a bootstrap subset port as a subset of the current bootstrap port,
+// tying its lifetime to the current task port, and switches the task's
+// bootstrap port to the new bootstrap subset port. Any subsequent bootstrap
+// servers created in the task via bootstrap_create_server and directed at the
+// bootstrap port will be created in the bootstrap subset port, meaning that
+// they will only be visible via bootstrap_look_up to this task and its
+// children, and that these mappings will be destroyed along with the subset
+// port as soon as this process exits.
+//
+// This scheme prevents bootstrap server mappings from leaking beyond this
+// process' lifetime. It also prevents any mappings from being visible by any
+// process other than this one and its children, but currently, nothing
+// requires this behavior. If anything ever does, this function could save the
+// original bootstrap port and make it available to things that need to call
+// bootstrap_create_server and create mappings with the original bootstrap
+// port.
+//
+// This needs to be called before anything calls bootstrap_create_server.
+// Currently, the only things that create bootstrap server mappings are
+// Breakpad and rohitfork. To look for other users, search for
+// bootstrap_create_server and -[NSMachBootstrapServer registerPort:name:].
+void SwitchToMachBootstrapSubsetPort();
+
#endif // CHROME_APP_CHROME_MAIN_MAC_H_

Powered by Google App Engine
This is Rietveld 408576698