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

Unified Diff: chrome/installer/setup/setup_main.cc

Issue 1387963006: Adding error handlers to setup.exe (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 months 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 side-by-side diff with in-line comments
Download patch
Index: chrome/installer/setup/setup_main.cc
diff --git a/chrome/installer/setup/setup_main.cc b/chrome/installer/setup/setup_main.cc
index ee2601f50fcf4f65074f4a426bd15201f6a7d62a..9c7959197fbc81fc663134399b558195a0b84853 100644
--- a/chrome/installer/setup/setup_main.cc
+++ b/chrome/installer/setup/setup_main.cc
@@ -21,6 +21,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/path_service.h"
#include "base/process/launch.h"
+#include "base/process/memory.h"
#include "base/strings/string16.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
@@ -28,6 +29,7 @@
#include "base/strings/utf_string_conversions.h"
#include "base/values.h"
#include "base/version.h"
+#include "base/win/process_startup_helper.h"
#include "base/win/registry.h"
#include "base/win/scoped_com_initializer.h"
#include "base/win/scoped_comptr.h"
@@ -1709,6 +1711,12 @@ int WINAPI wWinMain(HINSTANCE instance, HINSTANCE prev_instance,
scoped_ptr<google_breakpad::ExceptionHandler> breakpad(
InitializeCrashReporting(system_install));
+ // Make sure the setup exits cleanly on unexpected errors.
grt (UTC plus 2) 2015/10/08 11:52:08 s/setup/process/
Patrick Monette 2015/10/08 21:22:46 Done.
+ base::EnableTerminationOnHeapCorruption();
+ base::EnableTerminationOnOutOfMemory();
+ base::win::RegisterInvalidParamHandler();
+ base::win::SetupCRT(cmd_line);
+
InstallationState original_state;
original_state.Initialize();
« base/base.gyp ('K') | « chrome/installer/setup/BUILD.gn ('k') | chrome/nacl/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698