From f355c56028d0404855185541c7ba8568c22ed4a3 Mon Sep 17 00:00:00 2001 From: "cevans@chromium.org" Date: Fri, 21 Jan 2011 05:02:17 +0000 Subject: Make sure the process is _really_ gone after a __debugbreak(). We've had a few annoying cases where someone has been monitoring Chrome under windbg, which can skip over __debugbreak() and then show them a scary-looking access violation. BUG=NONE TEST=NONE Review URL: http://codereview.chromium.org/6372008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72107 0039d316-1c4b-4281-b951-d872f2087c98 --- base/debug/debugger_posix.cc | 3 +++ base/debug/debugger_win.cc | 3 +++ 2 files changed, 6 insertions(+) (limited to 'base') diff --git a/base/debug/debugger_posix.cc b/base/debug/debugger_posix.cc index b865e65..2eacaf9 100644 --- a/base/debug/debugger_posix.cc +++ b/base/debug/debugger_posix.cc @@ -174,6 +174,9 @@ bool BeingDebugged() { void BreakDebugger() { DEBUG_BREAK(); +#if defined(NDEBUG) + _exit(1); +#endif } } // namespace debug diff --git a/base/debug/debugger_win.cc b/base/debug/debugger_win.cc index 3323b61..b13dbfd 100644 --- a/base/debug/debugger_win.cc +++ b/base/debug/debugger_win.cc @@ -105,6 +105,9 @@ void BreakDebugger() { if (IsDebugUISuppressed()) _exit(1); __debugbreak(); +#if defined(NDEBUG) + _exit(1); +#endif } } // namespace debug -- cgit v1.1