зеркало из https://github.com/mozilla/gecko-dev.git
Bug 540967 - "missing output line for total leaks" because the parent process isn't waiting for the child process to clean up/write leak logs, r=cjones
This commit is contained in:
Родитель
4870a14160
Коммит
0d419bb10f
|
@ -24,7 +24,7 @@ class ProcessWatcher {
|
|||
// and SYNCHRONIZE permissions.
|
||||
//
|
||||
static void EnsureProcessTerminated(base::ProcessHandle process_handle
|
||||
#if defined(CHROMIUM_MOZILLA_BUILD) && defined(OS_POSIX)
|
||||
#if defined(CHROMIUM_MOZILLA_BUILD)
|
||||
, bool force=true
|
||||
#endif
|
||||
);
|
||||
|
|
|
@ -78,9 +78,21 @@ class TimerExpiredTask : public Task, public base::ObjectWatcher::Delegate {
|
|||
} // namespace
|
||||
|
||||
// static
|
||||
void ProcessWatcher::EnsureProcessTerminated(base::ProcessHandle process) {
|
||||
void ProcessWatcher::EnsureProcessTerminated(base::ProcessHandle process
|
||||
#ifdef CHROMIUM_MOZILLA_BUILD
|
||||
, bool force
|
||||
#endif
|
||||
) {
|
||||
DCHECK(process != GetCurrentProcess());
|
||||
|
||||
#ifdef CHROMIUM_MOZILLA_BUILD
|
||||
if (!force) {
|
||||
WaitForSingleObject(process, INFINITE);
|
||||
CloseHandle(process);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
// If already signaled, then we are done!
|
||||
if (WaitForSingleObject(process, 0) == WAIT_OBJECT_0) {
|
||||
CloseHandle(process);
|
||||
|
|
|
@ -91,7 +91,7 @@ GeckoChildProcessHost::~GeckoChildProcessHost()
|
|||
|
||||
if (mChildProcessHandle > 0)
|
||||
ProcessWatcher::EnsureProcessTerminated(mChildProcessHandle
|
||||
#if defined(OS_POSIX) && defined(NS_BUILD_REFCNT_LOGGING)
|
||||
#if defined(NS_BUILD_REFCNT_LOGGING)
|
||||
, false // don't "force"
|
||||
#endif
|
||||
);
|
||||
|
|
Загрузка…
Ссылка в новой задаче