Commit c3bff593 authored by Brian White's avatar Brian White Committed by Commit Bot

Track process only if launch is successful.

If the process launch fails it ends up trying to track PID #0 which
causes a DCHECK.

Bug: 757946
Change-Id: If4558b1707aad237273127365c5b5be64d32f327
Reviewed-on: https://chromium-review.googlesource.com/826085Reviewed-by: default avatarWill Harris <wfh@chromium.org>
Reviewed-by: default avatarMark Mentovai <mark@chromium.org>
Commit-Queue: Will Harris <wfh@chromium.org>
Commit-Queue: Brian White <bcwhite@chromium.org>
Cr-Commit-Position: refs/heads/master@{#524111}
parent eefdc769
......@@ -838,13 +838,6 @@ sandbox::ResultCode SandboxWin::StartSandboxedProcess(
TRACE_EVENT_END0("startup", "StartProcessWithAccess::LAUNCHPROCESS");
base::debug::GlobalActivityTracker* tracker =
base::debug::GlobalActivityTracker::Get();
if (tracker) {
tracker->RecordProcessLaunch(target.process_id(),
cmd_line->GetCommandLineString());
}
if (sandbox::SBOX_ALL_OK != result) {
base::UmaHistogramSparse("Process.Sandbox.Launch.Error", last_error);
if (result == sandbox::SBOX_ERROR_GENERIC)
......@@ -854,6 +847,13 @@ sandbox::ResultCode SandboxWin::StartSandboxedProcess(
return result;
}
base::debug::GlobalActivityTracker* tracker =
base::debug::GlobalActivityTracker::Get();
if (tracker) {
tracker->RecordProcessLaunch(target.process_id(),
cmd_line->GetCommandLineString());
}
if (sandbox::SBOX_ALL_OK != last_warning)
LogLaunchWarning(last_warning, last_error);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment