Index: handler/mac/main.cc |
diff --git a/handler/mac/main.cc b/handler/mac/main.cc |
index c5d152f724c9b9d2b8a1eb8fdf4cdfd01097be4e..57baedd44e6244138311f5ba49362b72a2801fb5 100644 |
--- a/handler/mac/main.cc |
+++ b/handler/mac/main.cc |
@@ -19,14 +19,17 @@ |
#include <string> |
#include "base/files/file_path.h" |
+#include "base/logging.h" |
#include "base/memory/scoped_ptr.h" |
#include "client/crash_report_database.h" |
#include "tools/tool_support.h" |
#include "handler/mac/crash_report_exception_handler.h" |
+#include "handler/mac/crash_report_upload_thread.h" |
#include "handler/mac/exception_handler_server.h" |
#include "util/mach/child_port_handshake.h" |
#include "util/posix/close_stdio.h" |
#include "util/stdlib/string_number_conversion.h" |
+#include "util/synchronization/semaphore.h" |
namespace crashpad { |
namespace { |
@@ -129,10 +132,15 @@ int HandlerMain(int argc, char* argv[]) { |
return EXIT_FAILURE; |
} |
- CrashReportExceptionHandler exception_handler(database.get()); |
+ CrashReportUploadThread upload_thread(database.get()); |
+ upload_thread.Start(); |
+ |
+ CrashReportExceptionHandler exception_handler(database.get(), &upload_thread); |
exception_handler_server.Run(&exception_handler); |
+ upload_thread.Stop(); |
+ |
return EXIT_SUCCESS; |
} |