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

Unified Diff: snapshot/win/exception_snapshot_win_test.cc

Issue 1409073013: mac: Make crashpad_handler get its receive right from its client (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Created 5 years, 2 months 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 | « handler/main.cc ('k') | util/mach/child_port_handshake.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 fe626a3873ef7ed6d63e90b5ec674881b474a0c1..7c3b3691409cb682b626a3239eca8cbd3984c6d3 100644
--- a/snapshot/win/exception_snapshot_win_test.cc
+++ b/snapshot/win/exception_snapshot_win_test.cc
@@ -41,16 +41,18 @@ class RunServerThread : public Thread {
public:
// Instantiates a thread which will invoke server->Run(delegate, pipe_name);
RunServerThread(ExceptionHandlerServer* server,
- ExceptionHandlerServer::Delegate* delegate)
- : server_(server), delegate_(delegate) {}
+ 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(delegate_); }
+ void ThreadMain() override { server_->Run(delegate_, pipe_name_); }
ExceptionHandlerServer* server_;
ExceptionHandlerServer::Delegate* delegate_;
+ std::string pipe_name_;
DISALLOW_COPY_AND_ASSIGN(RunServerThread);
};
@@ -128,8 +130,9 @@ void TestCrashingChild(const base::string16& directory_modification) {
ScopedKernelHANDLE completed(CreateEvent(nullptr, false, false, nullptr));
CrashingDelegate delegate(server_ready.get(), completed.get());
- ExceptionHandlerServer exception_handler_server(pipe_name);
- RunServerThread server_thread(&exception_handler_server, &delegate);
+ 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);
@@ -230,8 +233,9 @@ void TestDumpWithoutCrashingChild(
ScopedKernelHANDLE completed(CreateEvent(nullptr, false, false, nullptr));
SimulateDelegate delegate(server_ready.get(), completed.get());
- ExceptionHandlerServer exception_handler_server(pipe_name);
- RunServerThread server_thread(&exception_handler_server, &delegate);
+ 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);
« no previous file with comments | « handler/main.cc ('k') | util/mach/child_port_handshake.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698