From: Andy Dill Date: Thu, 21 May 2015 15:54:27 +0000 (-0700) Subject: Remove explicit nullptr and add clarifying comment. X-Git-Tag: v0.27.0~18^2 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=9a768dd4f0f55149d8dbcbb191d559c42dfbc646;p=electron.git Remove explicit nullptr and add clarifying comment. --- diff --git a/atom/common/crash_reporter/crash_reporter_win.cc b/atom/common/crash_reporter/crash_reporter_win.cc index ebb9a784..a348cf01 100644 --- a/atom/common/crash_reporter/crash_reporter_win.cc +++ b/atom/common/crash_reporter/crash_reporter_win.cc @@ -54,7 +54,11 @@ void CrashReporterWin::InitBreakpad(const std::string& product_name, if (waiting_event != INVALID_HANDLE_VALUE) WaitForSingleObject(waiting_event, 1000); - breakpad_.reset(nullptr); + // ExceptionHandler() attaches our handler and ~ExceptionHandler() detaches + // it, so we must explicitly reset *before* we instantiate our new handler + // to allow any previous handler to detach in the correct order. + breakpad_.reset(); + int handler_types = google_breakpad::ExceptionHandler::HANDLER_EXCEPTION | google_breakpad::ExceptionHandler::HANDLER_PURECALL; breakpad_.reset(new google_breakpad::ExceptionHandler(