Bug 1011225 - [e10s] Name mac content process. r=mstange

--HG--
extra : rebase_source : 0b1e31e9fed6ec6227c101c3ccd6b5401822778c
This commit is contained in:
Benoit Girard 2014-05-15 16:52:30 -04:00
parent 6bfed5e01a
commit edd15d01b3
3 changed files with 28 additions and 0 deletions

View File

@ -556,6 +556,7 @@ ContentChild::InitProcessAttributes()
{
SendGetProcessAttributes(&mID, &mIsForApp, &mIsForBrowser);
#ifdef MOZ_WIDGET_GONK
#ifdef MOZ_NUWA_PROCESS
if (IsNuwaProcess()) {
SetProcessName(NS_LITERAL_STRING("(Nuwa)"), false);
@ -567,6 +568,9 @@ ContentChild::InitProcessAttributes()
} else {
SetProcessName(NS_LITERAL_STRING("Browser"), false);
}
#else
SetProcessName(NS_LITERAL_STRING("Content Process"), true);
#endif
}

View File

@ -0,0 +1,20 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "ProcessUtils.h"
#include "nsString.h"
#include "mozilla/plugins/PluginUtilsOSX.h"
namespace mozilla {
namespace ipc {
void SetThisProcessName(const char *aName)
{
mozilla::plugins::PluginUtilsOSX::SetProcessName(aName);
}
} // namespace ipc
} // namespace mozilla

View File

@ -83,6 +83,10 @@ elif CONFIG['OS_ARCH'] in ('DragonFly', 'FreeBSD', 'NetBSD', 'OpenBSD'):
UNIFIED_SOURCES += [
'ProcessUtils_bsd.cpp'
]
elif CONFIG['OS_ARCH'] in ('Darwin'):
UNIFIED_SOURCES += [
'ProcessUtils_mac.mm'
]
else:
UNIFIED_SOURCES += [
'ProcessUtils_none.cpp',