diff options
author | eroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-24 06:03:11 +0000 |
---|---|---|
committer | eroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-24 06:03:11 +0000 |
commit | c912db5ede05f45e5346b745da9da97b833922a8 (patch) | |
tree | f2c4c70fb9581433ce34ef69fe48e060473916b2 /base/win/win_util.cc | |
parent | faf7de70c5fbea47af48558a1f83acddedd63adf (diff) | |
download | chromium_src-c912db5ede05f45e5346b745da9da97b833922a8.zip chromium_src-c912db5ede05f45e5346b745da9da97b833922a8.tar.gz chromium_src-c912db5ede05f45e5346b745da9da97b833922a8.tar.bz2 |
[windows] Make calls to exit(), _exit(), abort(), and ExitProcess() from the renderer process result in a crash.
BUG=118665
Review URL: http://codereview.chromium.org/9803002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@128701 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/win/win_util.cc')
-rw-r--r-- | base/win/win_util.cc | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/base/win/win_util.cc b/base/win/win_util.cc index 15a6445..8dd5afc 100644 --- a/base/win/win_util.cc +++ b/base/win/win_util.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -23,6 +23,8 @@ namespace base { namespace win { +static bool g_crash_on_process_detach = false; + #define NONCLIENTMETRICS_SIZE_PRE_VISTA \ SIZEOF_STRUCT_WITH_SPECIFIED_LAST_MEMBER(NONCLIENTMETRICS, lfMessageFont) @@ -148,6 +150,14 @@ bool ReadCommandFromAutoRun(HKEY root_key, return (autorun_key.ReadValue(name.c_str(), command) == ERROR_SUCCESS); } +void SetShouldCrashOnProcessDetach(bool crash) { + g_crash_on_process_detach = crash; +} + +bool ShouldCrashOnProcessDetach() { + return g_crash_on_process_detach; +} + } // namespace win } // namespace base |