Windows: Revert early chrome_elf crashpad initialization (issue #2122)

This commit is contained in:
Marshall Greenblatt
2017-04-27 12:33:24 -04:00
parent 30bc708a04
commit b7ab3f2be2
5 changed files with 24 additions and 30 deletions

View File

@@ -60,7 +60,8 @@ class CefForceShutdown {
}
} g_force_shutdown;
#if defined(OS_WIN) && defined(ARCH_CPU_X86_64)
#if defined(OS_WIN)
#if defined(ARCH_CPU_X86_64)
// VS2013 only checks the existence of FMA3 instructions, not the enabled-ness
// of them at the OS level (this is fixed in VS2015). We force off usage of
// FMA3 instructions in the CRT to avoid using that path and hitting illegal
@@ -72,7 +73,18 @@ void DisableFMA3() {
disabled = true;
_set_FMA3_enable(0);
}
#endif
#endif // defined(ARCH_CPU_X86_64)
// Signal chrome_elf to initialize crash reporting, rather than doing it in
// DllMain. See https://crbug.com/656800 for details.
void InitCrashReporter() {
static bool initialized = false;
if (initialized)
return;
initialized = true;
SignalInitializeCrashReporting();
}
#endif // defined(OS_WIN)
#if defined(OS_MACOSX) || defined(OS_WIN)
@@ -143,9 +155,12 @@ bool GetColor(const cef_color_t cef_in, bool is_windowless, SkColor* sk_out) {
int CefExecuteProcess(const CefMainArgs& args,
CefRefPtr<CefApp> application,
void* windows_sandbox_info) {
#if defined(OS_WIN) && defined(ARCH_CPU_X86_64)
#if defined(OS_WIN)
#if defined(ARCH_CPU_X86_64)
DisableFMA3();
#endif
InitCrashReporter();
#endif
base::CommandLine command_line(base::CommandLine::NO_PROGRAM);
#if defined(OS_WIN)
@@ -199,9 +214,12 @@ bool CefInitialize(const CefMainArgs& args,
const CefSettings& settings,
CefRefPtr<CefApp> application,
void* windows_sandbox_info) {
#if defined(OS_WIN) && defined(ARCH_CPU_X86_64)
#if defined(OS_WIN)
#if defined(ARCH_CPU_X86_64)
DisableFMA3();
#endif
InitCrashReporter();
#endif
// Return true if the global context already exists.
if (g_context)