Ignore invalid parameter error in Electron

This commit is contained in:
Cheng Zhao 2016-05-25 13:45:25 +09:00
parent f34cd8767c
commit 545c9f5bed

View file

@ -30,6 +30,13 @@ bool IsBrowserProcess(base::CommandLine* cmd) {
return process_type.empty(); return process_type.empty();
} }
#if defined(OS_WIN)
void InvalidParameterHandler(const wchar_t*, const wchar_t*, const wchar_t*,
unsigned int, uintptr_t) {
// noop.
}
#endif
} // namespace } // namespace
AtomMainDelegate::AtomMainDelegate() { AtomMainDelegate::AtomMainDelegate() {
@ -87,6 +94,11 @@ bool AtomMainDelegate::BasicStartupComplete(int* exit_code) {
SetUpBundleOverrides(); SetUpBundleOverrides();
#endif #endif
#if defined(OS_WIN)
// Ignore invalid parameter errors.
_set_invalid_parameter_handler(InvalidParameterHandler);
#endif
return brightray::MainDelegate::BasicStartupComplete(exit_code); return brightray::MainDelegate::BasicStartupComplete(exit_code);
} }