]> khamidou — GitHub mirrors - electron.git/commitdiff
win: Don't crash on invalid parameter error.
authorCheng Zhao <zcbenz@gmail.com>
Sat, 26 Jul 2014 03:09:01 +0000 (11:09 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Sat, 26 Jul 2014 03:14:28 +0000 (11:14 +0800)
libuv relies on suppressing the invalid parameter error in
uv__get_osfhandle, and it could hanppen frequently.

Fixes #513.

atom/common/crash_reporter/crash_reporter_win.cc

index 6a581cc9710b68f87e6b41a167dc7795397f00dd..8131c482e822379c81c311e106f041005fc5df69 100644 (file)
@@ -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)));