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

Unified Diff: content/app/content_main.cc

Issue 7863024: Make the NaCl windows 64 bit binaries not depend on chrome targets. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: simplify chrome_exe.gypi Created 9 years, 3 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
« no previous file with comments | « chrome/tools/build/win/SYMBOLS ('k') | content/app/sandbox_helper_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/app/content_main.cc
===================================================================
--- content/app/content_main.cc (revision 100721)
+++ content/app/content_main.cc (working copy)
@@ -5,7 +5,6 @@
#include "content/app/content_main.h"
#include "base/at_exit.h"
-#include "base/base_switches.h"
#include "base/command_line.h"
#include "base/debug/debugger.h"
#include "base/i18n/icu_util.h"
@@ -17,6 +16,7 @@
#include "base/stringprintf.h"
#include "base/string_number_conversions.h"
#include "content/app/content_main_delegate.h"
+#include "content/app/startup_helper_win.h"
#include "content/common/content_constants.h"
#include "content/common/content_paths.h"
#include "content/common/content_switches.h"
@@ -31,7 +31,6 @@
#if defined(OS_WIN)
#include <atlbase.h>
#include <atlapp.h>
-#include <new.h>
#include <malloc.h>
#elif defined(OS_MACOSX)
#include "base/mach_ipc_mac.h"
@@ -76,31 +75,6 @@
static CAppModule _Module;
-#pragma optimize("", off)
-// Handlers for invalid parameter and pure call. They generate a breakpoint to
-// tell breakpad that it needs to dump the process.
-void InvalidParameter(const wchar_t* expression, const wchar_t* function,
- const wchar_t* file, unsigned int line,
- uintptr_t reserved) {
- __debugbreak();
- _exit(1);
-}
-
-void PureCall() {
- __debugbreak();
- _exit(1);
-}
-#pragma optimize("", on)
-
-// Register the invalid param handler and pure call handler to be able to
-// notify breakpad when it happens.
-void RegisterInvalidParamHandler() {
- _set_invalid_parameter_handler(InvalidParameter);
- _set_purecall_handler(PureCall);
- // Also enable the new handler for malloc() based failures.
- _set_new_mode(1);
-}
-
#elif defined(OS_MACOSX)
// Completes the Mach IPC handshake by sending this process' task port to the
@@ -154,19 +128,6 @@
#endif // OS_POSIX
-void SetupCRT(const CommandLine& command_line) {
-#if defined(OS_WIN)
-#if defined(_CRTDBG_MAP_ALLOC)
- _CrtSetReportFile(_CRT_WARN, _CRTDBG_FILE_STDERR);
- _CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE);
-#else
- if (!command_line.HasSwitch(switches::kDisableBreakpad)) {
- _CrtSetReportMode(_CRT_ASSERT, 0);
- }
-#endif
-#endif
-}
-
void CommonSubprocessInit(const std::string& process_type) {
#if defined(OS_WIN)
// HACK: Let Windows know that we have started. This is needed to suppress
@@ -319,7 +280,7 @@
int argc = 0;
char** argv = NULL;
- RegisterInvalidParamHandler();
+ content::RegisterInvalidParamHandler();
_Module.Init(NULL, static_cast<HINSTANCE>(instance));
#else
int ContentMain(int argc,
@@ -392,6 +353,8 @@
(!delegate || delegate->ShouldSendMachPort(process_type))) {
SendTaskPortToParentProcess();
}
+#elif defined(OS_WIN)
+ content::SetupCRT(command_line);
#endif
#if defined(OS_POSIX)
@@ -412,8 +375,6 @@
}
#endif
- SetupCRT(command_line);
-
#if defined(USE_NSS)
crypto::EarlySetupForNSSInit();
#endif
« no previous file with comments | « chrome/tools/build/win/SYMBOLS ('k') | content/app/sandbox_helper_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698