Index: content/common/sandbox_win.cc |
diff --git a/content/common/sandbox_win.cc b/content/common/sandbox_win.cc |
index 0211a1c73ced3af904dfba9bd1df4bf84585f9f6..0a25bdcf62d020e6e3671124025b9814583036eb 100644 |
--- a/content/common/sandbox_win.cc |
+++ b/content/common/sandbox_win.cc |
@@ -8,6 +8,7 @@ |
#include "base/base_switches.h" |
#include "base/command_line.h" |
+#include "base/debug/dump_without_crashing.h" |
#include "base/debug/profiler.h" |
#include "base/files/file_util.h" |
#include "base/hash.h" |
@@ -728,7 +729,6 @@ base::Process StartSandboxedProcess( |
cmd_line->GetCommandLineString().c_str(), |
policy, &temp_process_info); |
DWORD last_error = ::GetLastError(); |
- policy->Release(); |
base::win::ScopedProcessInformation target(temp_process_info); |
TRACE_EVENT_END_ETW("StartProcessWithAccess::LAUNCHPROCESS", 0, 0); |
@@ -745,10 +745,18 @@ base::Process StartSandboxedProcess( |
"Process.Sandbox.Lowbox.Launch.Error" : |
"Process.Sandbox.Launch.Error", |
last_error); |
+ // Trigger a minidump without crashing the browser. |
+ // Note that this function will only generate minidump if content host |
+ // has already done pre-setup by calling |
+ // base::debug::SetDumpWithoutCrashingFunction |
+ base::debug::DumpWithoutCrashing(); |
} else |
DLOG(ERROR) << "Failed to launch process. Error: " << result; |
+ |
+ policy->Release(); |
return base::Process(); |
} |
+ policy->Release(); |
if (delegate) |
delegate->PostSpawnTarget(target.process_handle()); |