summaryrefslogtreecommitdiffstats
path: root/ipc/ipc_perftests.cc
diff options
context:
space:
mode:
authoryzshen <yzshen@chromium.org>2014-09-04 21:42:58 -0700
committerCommit bot <commit-bot@chromium.org>2014-09-05 04:44:52 +0000
commit22796d8d5fd362111b7aa431d229aa2ffc91aedd (patch)
treed1934a4f2520463e124b0b1757819d3ca43c7fa7 /ipc/ipc_perftests.cc
parenta7ae647d8f23b07f89cb6b1e67e095d457e94337 (diff)
downloadchromium_src-22796d8d5fd362111b7aa431d229aa2ffc91aedd.zip
chromium_src-22796d8d5fd362111b7aa431d229aa2ffc91aedd.tar.gz
chromium_src-22796d8d5fd362111b7aa431d229aa2ffc91aedd.tar.bz2
Fix a DCHECK violation in ipc_perftests
We only allow one MessageLoop instance alive at any given time on a thread. If we use IPCTestBase::set_message_loop(), we need to do it in two steps: first set the message loop to NULL, and then set it to a newly-created message loop. Therefore, I changed the interface of IPCTestBase to make it a little more friendly. BUG=None TEST=ipc_perftests should not crash in debug build. Review URL: https://codereview.chromium.org/538593002 Cr-Commit-Position: refs/heads/master@{#293439}
Diffstat (limited to 'ipc/ipc_perftests.cc')
-rw-r--r--ipc/ipc_perftests.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/ipc/ipc_perftests.cc b/ipc/ipc_perftests.cc
index dd08cf7..08a8d70 100644
--- a/ipc/ipc_perftests.cc
+++ b/ipc/ipc_perftests.cc
@@ -281,8 +281,8 @@ MULTIPROCESS_IPC_TEST_CLIENT_MAIN(PerformanceClient) {
}
TEST_F(IPCChannelPerfTest, ChannelProxyPingPong) {
- set_message_loop(make_scoped_ptr(new base::MessageLoop()));
- Init("PerformanceClient");
+ InitWithCustomMessageLoop("PerformanceClient",
+ make_scoped_ptr(new base::MessageLoop()));
base::TestIOThread io_thread(base::TestIOThread::kAutoStart);