summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authoralexeypa@chromium.org <alexeypa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-22 22:24:13 +0000
committeralexeypa@chromium.org <alexeypa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-22 22:24:13 +0000
commit54aa4f1ad7293be94fc044ee2f8adcffe729986d (patch)
tree1b5438b9bb1fc7866a2da980a0f4ff0fed7f2f2d /net
parent866fa2ccbffcbc41af001d772440f4baf5609848 (diff)
downloadchromium_src-54aa4f1ad7293be94fc044ee2f8adcffe729986d.zip
chromium_src-54aa4f1ad7293be94fc044ee2f8adcffe729986d.tar.gz
chromium_src-54aa4f1ad7293be94fc044ee2f8adcffe729986d.tar.bz2
Made MessagePump a non-thread safe class.
This CL makes MessagePump a non-thread safe class to make sure thread-bound resources (such as the UI window used for pumping messages on Windows) are freed on the correct thread. Handling of incoming tasks and synchronization between different threads was moved out to a separate class - IncomingTaskQueue reducing the number of locks to be taken while posting a task to one. Posting tasks via both MessageLoop and MessageLoopProxyImpl is now routed via IncomingTaskQueue. TBR all reviewers from https://chromiumcodereview.appspot.com/17567007/ because this is a re-land of it with a mechanical fix (adding a missing header). TBR=rsesek@chromium.org,darin@chromium.org,thakis@chromium.org,rvargas@chromium.org,dalecurtis@chromium.org BUG=241939 Review URL: https://codereview.chromium.org/19661004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@212987 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r--net/dns/dns_transaction_unittest.cc2
-rw-r--r--net/dns/serial_worker_unittest.cc4
2 files changed, 3 insertions, 3 deletions
diff --git a/net/dns/dns_transaction_unittest.cc b/net/dns/dns_transaction_unittest.cc
index 80473b5..f9667ee 100644
--- a/net/dns/dns_transaction_unittest.cc
+++ b/net/dns/dns_transaction_unittest.cc
@@ -621,7 +621,7 @@ TEST_F(DnsTransactionTest, Timeout) {
TransactionHelper helper0(kT0HostName, kT0Qtype, ERR_DNS_TIMED_OUT);
EXPECT_TRUE(helper0.RunUntilDone(transaction_factory_.get()));
- base::MessageLoop::current()->AssertIdle();
+ EXPECT_TRUE(base::MessageLoop::current()->IsIdleForTesting());
}
TEST_F(DnsTransactionTest, ServerFallbackAndRotate) {
diff --git a/net/dns/serial_worker_unittest.cc b/net/dns/serial_worker_unittest.cc
index 70259f7..442526f 100644
--- a/net/dns/serial_worker_unittest.cc
+++ b/net/dns/serial_worker_unittest.cc
@@ -141,7 +141,7 @@ TEST_F(SerialWorkerTest, ExecuteAndSerializeReads) {
WaitForWork();
RunUntilBreak("OnWorkFinished");
- message_loop_->AssertIdle();
+ EXPECT_TRUE(message_loop_->IsIdleForTesting());
}
// Schedule two calls. OnWork checks if it is called serially.
@@ -154,7 +154,7 @@ TEST_F(SerialWorkerTest, ExecuteAndSerializeReads) {
RunUntilBreak("OnWorkFinished");
// No more tasks should remain.
- message_loop_->AssertIdle();
+ EXPECT_TRUE(message_loop_->IsIdleForTesting());
}
} // namespace