diff options
author | maruel@google.com <maruel@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-16 00:47:22 +0000 |
---|---|---|
committer | maruel@google.com <maruel@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-16 00:47:22 +0000 |
commit | 6fb3ebaf46b393e7f378b59452e69fa8898e544b (patch) | |
tree | 21a84d6ba6def88b954786d0b44f30f7060c7ce7 /chrome/app/chrome_dll_main.cc | |
parent | 4625cf10889aa47fc3cd0511f15834ee202359ae (diff) | |
download | chromium_src-6fb3ebaf46b393e7f378b59452e69fa8898e544b.zip chromium_src-6fb3ebaf46b393e7f378b59452e69fa8898e544b.tar.gz chromium_src-6fb3ebaf46b393e7f378b59452e69fa8898e544b.tar.bz2 |
Fix the --disable-breakpad flag. It had no effect with the CRT asserts because they were simply disabled.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@970 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/app/chrome_dll_main.cc')
-rw-r--r-- | chrome/app/chrome_dll_main.cc | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/chrome/app/chrome_dll_main.cc b/chrome/app/chrome_dll_main.cc index 8bf6493..c029b54 100644 --- a/chrome/app/chrome_dll_main.cc +++ b/chrome/app/chrome_dll_main.cc @@ -137,16 +137,6 @@ static void EvictTroublesomeDlls() { DLLEXPORT int __cdecl ChromeMain(HINSTANCE instance, sandbox::SandboxInterfaceInfo* sandbox_info, TCHAR* command_line, int show_command) { -#ifdef _CRTDBG_MAP_ALLOC - _CrtSetReportFile(_CRT_WARN, _CRTDBG_FILE_STDERR); - _CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE); -#else - _CrtSetReportMode(_CRT_ASSERT, 0); -#endif - - // The exit manager is in charge of calling the dtors of singleton objects. - base::AtExitManager exit_manager; - // Register the invalid param handler and pure call handler to be able to // notify breakpad when it happens. _set_invalid_parameter_handler(InvalidParameter); @@ -156,8 +146,21 @@ DLLEXPORT int __cdecl ChromeMain(HINSTANCE instance, // Make sure malloc() calls the new handler too. _set_new_mode(1); + // The exit manager is in charge of calling the dtors of singleton objects. + base::AtExitManager exit_manager; + + // Initialize the command line. CommandLine parsed_command_line; +#ifdef _CRTDBG_MAP_ALLOC + _CrtSetReportFile(_CRT_WARN, _CRTDBG_FILE_STDERR); + _CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE); +#else + if (!parsed_command_line.HasSwitch(switches::kDisableBreakpad)) { + _CrtSetReportMode(_CRT_ASSERT, 0); + } +#endif + // Enable the low fragmentation heap for the CRT heap. The heap is not changed // if the process is run under the debugger is enabled or if certain gflags // are set. |