Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(692)

Side by Side Diff: base/debug/debugger_win.cc

Issue 759283005: Don't call exit() after __debugbreak() on release builds. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix andriod.... Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « base/debug/debugger_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/debug/debugger.h" 5 #include "base/debug/debugger.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 #include <windows.h> 8 #include <windows.h>
9 9
10 namespace base { 10 namespace base {
11 namespace debug { 11 namespace debug {
12 12
13 bool BeingDebugged() { 13 bool BeingDebugged() {
14 return ::IsDebuggerPresent() != 0; 14 return ::IsDebuggerPresent() != 0;
15 } 15 }
16 16
17 void BreakDebugger() { 17 void BreakDebugger() {
18 if (IsDebugUISuppressed()) 18 if (IsDebugUISuppressed())
19 _exit(1); 19 _exit(1);
20
20 __debugbreak(); 21 __debugbreak();
21 #if defined(NDEBUG)
22 _exit(1);
23 #endif
24 } 22 }
25 23
26 } // namespace debug 24 } // namespace debug
27 } // namespace base 25 } // namespace base
OLDNEW
« no previous file with comments | « base/debug/debugger_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698