Index: snapshot/win/exception_snapshot_win_test.cc |
diff --git a/snapshot/win/exception_snapshot_win_test.cc b/snapshot/win/exception_snapshot_win_test.cc |
index dbed3f80cfa9777858a62ad111fb0d638b84e3fc..52d6c7e247223221637a338286aed05b588cafe1 100644 |
--- a/snapshot/win/exception_snapshot_win_test.cc |
+++ b/snapshot/win/exception_snapshot_win_test.cc |
@@ -113,17 +113,19 @@ class ExceptionSnapshotWinTest : public testing::Test { |
// Runs the ExceptionHandlerServer on a background thread. |
class RunServerThread : public Thread { |
public: |
- // Instantiates a thread which will invoke server->Run(pipe_name); |
- explicit RunServerThread(ExceptionHandlerServer* server, |
- const std::string& pipe_name) |
- : server_(server), pipe_name_(pipe_name) {} |
+ // Instantiates a thread which will invoke server->Run(delegate, pipe_name); |
+ RunServerThread(ExceptionHandlerServer* server, |
+ ExceptionHandlerServer::Delegate* delegate, |
+ const std::string& pipe_name) |
+ : server_(server), delegate_(delegate), pipe_name_(pipe_name) {} |
~RunServerThread() override {} |
private: |
// Thread: |
- void ThreadMain() override { server_->Run(pipe_name_); } |
+ void ThreadMain() override { server_->Run(delegate_, pipe_name_); } |
ExceptionHandlerServer* server_; |
+ ExceptionHandlerServer::Delegate* delegate_; |
std::string pipe_name_; |
DISALLOW_COPY_AND_ASSIGN(RunServerThread); |
@@ -133,8 +135,7 @@ class RunServerThread : public Thread { |
// thread joined. |
class ScopedStopServerAndJoinThread { |
public: |
- explicit ScopedStopServerAndJoinThread(ExceptionHandlerServer* server, |
- Thread* thread) |
+ ScopedStopServerAndJoinThread(ExceptionHandlerServer* server, Thread* thread) |
: server_(server), thread_(thread) {} |
~ScopedStopServerAndJoinThread() { |
server_->Stop(); |
@@ -199,8 +200,9 @@ TEST_F(ExceptionSnapshotWinTest, ChildCrash) { |
ScopedKernelHANDLE completed(CreateEvent(nullptr, false, false, nullptr)); |
Delegate delegate(server_ready.get(), completed.get()); |
- ExceptionHandlerServer exception_handler_server(&delegate); |
- RunServerThread server_thread(&exception_handler_server, pipe_name); |
+ ExceptionHandlerServer exception_handler_server; |
+ RunServerThread server_thread( |
+ &exception_handler_server, &delegate, pipe_name); |
server_thread.Start(); |
ScopedStopServerAndJoinThread scoped_stop_server_and_join_thread( |
&exception_handler_server, &server_thread); |