summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorthomasvl@chromium.org <thomasvl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-20 20:14:13 +0000
committerthomasvl@chromium.org <thomasvl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-20 20:14:13 +0000
commit757d1a96a2daade0b3ea2b1b4d09e610ffc4e780 (patch)
tree50a8079b41d8c30647978d40a254b27c5201db6f
parenta6f52cc255d22abd7d9ac9a90178a925ecc8a763 (diff)
downloadchromium_src-757d1a96a2daade0b3ea2b1b4d09e610ffc4e780.zip
chromium_src-757d1a96a2daade0b3ea2b1b4d09e610ffc4e780.tar.gz
chromium_src-757d1a96a2daade0b3ea2b1b4d09e610ffc4e780.tar.bz2
Merge 44277 - [Mac] Force the Process Manager to start up when loading the symbols for process naming. The call seems to use those mach ports, and relying on some other code to start it up seems to be a crap shoot.
BUG=40583 TEST=release builds get the renderer, worker, etc. named as such in Activity Monitor. Might also help the Null named processes. Review URL: http://codereview.chromium.org/1589030 TBR=thomasvl@chromium.org Review URL: http://codereview.chromium.org/1712001 git-svn-id: svn://svn.chromium.org/chrome/branches/375/src@45073 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--base/mac_util.mm9
1 files changed, 9 insertions, 0 deletions
diff --git a/base/mac_util.mm b/base/mac_util.mm
index 91ad48c..00ef9e09 100644
--- a/base/mac_util.mm
+++ b/base/mac_util.mm
@@ -449,6 +449,15 @@ void SetProcessName(CFStringRef process_name) {
ls_display_name_key = key_pointer ? *key_pointer : NULL;
if (!ls_display_name_key)
LOG(ERROR) << "Could not find _kLSDisplayNameKey";
+
+ // Internally, this call relies on the Mach ports that are started up by the
+ // Carbon Process Manager. In debug builds this usually happens due to how
+ // the logging layers are started up; but in release, it isn't started in as
+ // much of a defined order. So if the symbols had to be loaded, go ahead
+ // and force a call to make sure the manager has been initialized and hence
+ // the ports are opened.
+ ProcessSerialNumber psn;
+ GetCurrentProcess(&psn);
}
if (!ls_get_current_application_asn_func ||
!ls_set_application_information_item_func ||