summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authorthomasvl@chromium.org <thomasvl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-12 21:08:47 +0000
committerthomasvl@chromium.org <thomasvl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-12 21:08:47 +0000
commit1e23bac67cabb7697c3f3745ca652d5af6033a03 (patch)
tree37c4b80ce0ac811a5dfcd94fcd3506f81470aca0 /base
parente006fdb3e1688c6c64e87abe120dffe27244db14 (diff)
downloadchromium_src-1e23bac67cabb7697c3f3745ca652d5af6033a03.zip
chromium_src-1e23bac67cabb7697c3f3745ca652d5af6033a03.tar.gz
chromium_src-1e23bac67cabb7697c3f3745ca652d5af6033a03.tar.bz2
[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 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44277 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-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 ||