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

Unified Diff: cc/trees/proxy.cc

Issue 485043003: cc: Use correct message loop proxy in BlockingTaskRunner (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix tests. Created 6 years, 4 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
« cc/trees/blocking_task_runner.h ('K') | « cc/trees/proxy.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/proxy.cc
diff --git a/cc/trees/proxy.cc b/cc/trees/proxy.cc
index 3136c65713f962c6049154c47ec98d61221f9e02..1d3c175dfddea0991e2032a96cb0b15f223ff6f8 100644
--- a/cc/trees/proxy.cc
+++ b/cc/trees/proxy.cc
@@ -6,6 +6,7 @@
#include "base/message_loop/message_loop_proxy.h"
#include "base/single_thread_task_runner.h"
+#include "cc/trees/blocking_task_runner.h"
namespace cc {
@@ -69,18 +70,24 @@ void Proxy::SetMainThreadBlocked(bool is_main_thread_blocked) {
Proxy::Proxy(scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner)
#if !DCHECK_IS_ON
- : main_task_runner_(main_task_runner), impl_task_runner_(impl_task_runner) {
+ : main_task_runner_(main_task_runner),
+ impl_task_runner_(impl_task_runner),
+ blocking_main_thread_task_runner_(BlockingTaskRunner::current()) {
#else
: main_task_runner_(main_task_runner),
impl_task_runner_(impl_task_runner),
+ blocking_main_thread_task_runner_(BlockingTaskRunner::current()),
main_thread_id_(base::PlatformThread::CurrentId()),
impl_thread_is_overridden_(false),
is_main_thread_blocked_(false) {
#endif
+ blocking_main_thread_task_runner_->SetTaskRunner(main_task_runner_);
}
Proxy::~Proxy() {
DCHECK(IsMainThread());
+ blocking_main_thread_task_runner_->SetTaskRunner(
+ base::MessageLoopProxy::current());
}
} // namespace cc
« cc/trees/blocking_task_runner.h ('K') | « cc/trees/proxy.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698