Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(510)

Unified Diff: util/win/exception_handler_server.cc

Issue 1428803006: win: Implement CrashpadClient::StartHandler() (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Address review feedback; add a test Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « util/win/exception_handler_server.h ('k') | util/win/exception_handler_server_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: util/win/exception_handler_server.cc
diff --git a/util/win/exception_handler_server.cc b/util/win/exception_handler_server.cc
index 234d3149ec94333b18425dda926ac66a5a30b50e..50daa39a92a2035c71f4395c7861a7eb2980c848 100644
--- a/util/win/exception_handler_server.cc
+++ b/util/win/exception_handler_server.cc
@@ -234,11 +234,13 @@ class ClientData {
ExceptionHandlerServer::Delegate::~Delegate() {
}
-ExceptionHandlerServer::ExceptionHandlerServer(const std::string& pipe_name)
+ExceptionHandlerServer::ExceptionHandlerServer(const std::string& pipe_name,
+ bool persistent)
: pipe_name_(pipe_name),
port_(CreateIoCompletionPort(INVALID_HANDLE_VALUE, nullptr, 0, 1)),
clients_lock_(),
- clients_() {
+ clients_(),
+ persistent_(persistent) {
}
ExceptionHandlerServer::~ExceptionHandlerServer() {
@@ -297,11 +299,11 @@ void ExceptionHandlerServer::Run(Delegate* delegate) {
// outstanding threadpool waits are complete. This is important because the
// process handle can be signalled *before* the dump request is signalled.
internal::ClientData* client = reinterpret_cast<internal::ClientData*>(key);
- {
- base::AutoLock lock(clients_lock_);
- clients_.erase(client);
- }
+ base::AutoLock lock(clients_lock_);
+ clients_.erase(client);
delete client;
+ if (!persistent_ && clients_.empty())
+ break;
}
// Signal to the named pipe instances that they should terminate.
« no previous file with comments | « util/win/exception_handler_server.h ('k') | util/win/exception_handler_server_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698