Windows: Add missing crashpad initialization (issue #1995)
This commit is contained in:
parent
03ed733800
commit
48908c9195
|
@ -56,7 +56,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
|
||||
|
@ -68,16 +69,30 @@ void DisableFMA3() {
|
|||
disabled = true;
|
||||
_set_FMA3_enable(0);
|
||||
}
|
||||
#endif // WIN && ARCH_CPU_X86_64
|
||||
#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 InitializeCrashReporting() {
|
||||
static bool initialized = false;
|
||||
if (initialized)
|
||||
return;
|
||||
initialized = true;
|
||||
SignalInitializeCrashReporting();
|
||||
}
|
||||
#endif // defined(OS_WIN)
|
||||
|
||||
} // namespace
|
||||
|
||||
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
|
||||
InitializeCrashReporting();
|
||||
#endif
|
||||
|
||||
base::CommandLine command_line(base::CommandLine::NO_PROGRAM);
|
||||
#if defined(OS_WIN)
|
||||
|
@ -131,9 +146,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
|
||||
InitializeCrashReporting();
|
||||
#endif
|
||||
|
||||
// Return true if the global context already exists.
|
||||
if (g_context)
|
||||
|
|
Loading…
Reference in New Issue