зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1320134 - Part 2: Initialize and shutdown the TLS allocation tracker in the content process. r=froydnj
MozReview-Commit-ID: 2Pu9r1MV1e4
This commit is contained in:
Родитель
201ba88937
Коммит
7c8969a918
|
@ -25,6 +25,7 @@
|
|||
#ifdef XP_WIN
|
||||
#include <process.h>
|
||||
#include "mozilla/ipc/WindowsMessageLoop.h"
|
||||
#include "mozilla/TlsAllocationTracker.h"
|
||||
#endif
|
||||
|
||||
#include "nsAppDirectoryServiceDefs.h"
|
||||
|
@ -358,6 +359,14 @@ XRE_InitChildProcess(int aArgc,
|
|||
#endif
|
||||
|
||||
#if defined(XP_WIN)
|
||||
#ifndef DEBUG
|
||||
// XXX Bug 1320134: added for diagnosing the crashes because we're running out
|
||||
// of TLS indices on Windows. Remove after the root cause is found.
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Content) {
|
||||
mozilla::InitTlsAllocationTracker();
|
||||
}
|
||||
#endif
|
||||
|
||||
// From the --attach-console support in nsNativeAppSupportWin.cpp, but
|
||||
// here we are a content child process, so we always attempt to attach
|
||||
// to the parent's (ie, the browser's) console.
|
||||
|
@ -697,6 +706,14 @@ XRE_InitChildProcess(int aArgc,
|
|||
}
|
||||
}
|
||||
|
||||
#if defined(XP_WIN) && !defined(DEBUG)
|
||||
// XXX Bug 1320134: added for diagnosing the crashes because we're running out
|
||||
// of TLS indices on Windows. Remove after the root cause is found.
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Content) {
|
||||
mozilla::ShutdownTlsAllocationTracker();
|
||||
}
|
||||
#endif
|
||||
|
||||
Telemetry::DestroyStatisticsRecorder();
|
||||
return XRE_DeinitCommandLine();
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче