зеркало из https://github.com/mozilla/gecko-dev.git
Bug 974540 - Fix nsMemoryReporterManager child count for Nuwa. r=khuey
This commit is contained in:
Родитель
47f9e25a13
Коммит
900543cc8b
|
@ -1190,7 +1190,12 @@ ContentParent::ActorDestroy(ActorDestroyReason why)
|
|||
// Tell the memory reporter manager that this ContentParent is going away.
|
||||
nsRefPtr<nsMemoryReporterManager> mgr =
|
||||
nsMemoryReporterManager::GetOrCreate();
|
||||
if (mgr) {
|
||||
#ifdef MOZ_NUWA_PROCESS
|
||||
bool isMemoryChild = !IsNuwaProcess();
|
||||
#else
|
||||
bool isMemoryChild = true;
|
||||
#endif
|
||||
if (mgr && isMemoryChild) {
|
||||
mgr->DecrementNumChildProcesses();
|
||||
}
|
||||
|
||||
|
@ -1405,11 +1410,13 @@ ContentParent::ContentParent(mozIApplication* aApp,
|
|||
|
||||
IToplevelProtocol::SetTransport(mSubprocess->GetChannel());
|
||||
|
||||
// Tell the memory reporter manager that this ContentParent exists.
|
||||
nsRefPtr<nsMemoryReporterManager> mgr =
|
||||
nsMemoryReporterManager::GetOrCreate();
|
||||
if (mgr) {
|
||||
mgr->IncrementNumChildProcesses();
|
||||
if (!aIsNuwaProcess) {
|
||||
// Tell the memory reporter manager that this ContentParent exists.
|
||||
nsRefPtr<nsMemoryReporterManager> mgr =
|
||||
nsMemoryReporterManager::GetOrCreate();
|
||||
if (mgr) {
|
||||
mgr->IncrementNumChildProcesses();
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<std::string> extraArgs;
|
||||
|
@ -1471,6 +1478,13 @@ ContentParent::ContentParent(ContentParent* aTemplate,
|
|||
*fd,
|
||||
aOSPrivileges);
|
||||
|
||||
// Tell the memory reporter manager that this ContentParent exists.
|
||||
nsRefPtr<nsMemoryReporterManager> mgr =
|
||||
nsMemoryReporterManager::GetOrCreate();
|
||||
if (mgr) {
|
||||
mgr->IncrementNumChildProcesses();
|
||||
}
|
||||
|
||||
mSubprocess->LaunchAndWaitForProcessHandle();
|
||||
|
||||
// Clone actors routed by aTemplate for this instance.
|
||||
|
|
Загрузка…
Ссылка в новой задаче