From: Cheng Zhao Date: Sat, 26 Jul 2014 03:09:01 +0000 (+0800) Subject: win: Don't crash on invalid parameter error. X-Git-Tag: v0.14.3~4 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=b9d64784bb70afc211e8c95e108c75c03a23c5a0;p=electron.git win: Don't crash on invalid parameter error. libuv relies on suppressing the invalid parameter error in uv__get_osfhandle, and it could hanppen frequently. Fixes #513. --- diff --git a/atom/common/crash_reporter/crash_reporter_win.cc b/atom/common/crash_reporter/crash_reporter_win.cc index 6a581cc9..8131c482 100644 --- a/atom/common/crash_reporter/crash_reporter_win.cc +++ b/atom/common/crash_reporter/crash_reporter_win.cc @@ -54,12 +54,14 @@ void CrashReporterWin::InitBreakpad(const std::string& product_name, if (waiting_event != INVALID_HANDLE_VALUE) WaitForSingleObject(waiting_event, 1000); + int handler_types = google_breakpad::ExceptionHandler::HANDLER_EXCEPTION | + google_breakpad::ExceptionHandler::HANDLER_PURECALL; breakpad_.reset(new google_breakpad::ExceptionHandler( temp_dir.value(), FilterCallback, MinidumpCallback, this, - google_breakpad::ExceptionHandler::HANDLER_ALL, + handler_types, kSmallDumpType, pipe_name.c_str(), GetCustomInfo(product_name, version, company_name)));