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

Unified Diff: third_party/WebKit/Source/platform/scheduler/child/scheduler_tqm_delegate_impl.cc

Issue 2818533003: Make nesting/running states a RunLoop rather than a MessageLoop concept. (Closed)
Patch Set: still need to check MessageLoop::current() in Mojo's RunLoopNestingObserver::GetForThread() Created 3 years, 7 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
Index: third_party/WebKit/Source/platform/scheduler/child/scheduler_tqm_delegate_impl.cc
diff --git a/third_party/WebKit/Source/platform/scheduler/child/scheduler_tqm_delegate_impl.cc b/third_party/WebKit/Source/platform/scheduler/child/scheduler_tqm_delegate_impl.cc
index 007dd53947faa8eb102c499996ab7b1d2cd8ab37..ffbdb775fc689ac2d6449bd204a6001a978d543e 100644
--- a/third_party/WebKit/Source/platform/scheduler/child/scheduler_tqm_delegate_impl.cc
+++ b/third_party/WebKit/Source/platform/scheduler/child/scheduler_tqm_delegate_impl.cc
@@ -6,6 +6,8 @@
#include <utility>
+#include "base/run_loop.h"
+
namespace blink {
namespace scheduler {
@@ -59,17 +61,18 @@ bool SchedulerTqmDelegateImpl::RunsTasksOnCurrentThread() const {
}
bool SchedulerTqmDelegateImpl::IsNested() const {
- return message_loop_->IsNested();
+ DCHECK(RunsTasksOnCurrentThread());
+ return base::RunLoop::IsNestedOnCurrentThread();
}
void SchedulerTqmDelegateImpl::AddNestingObserver(
- base::MessageLoop::NestingObserver* observer) {
- message_loop_->AddNestingObserver(observer);
+ base::RunLoop::NestingObserver* observer) {
+ base::RunLoop::AddNestingObserverOnCurrentThread(observer);
}
void SchedulerTqmDelegateImpl::RemoveNestingObserver(
- base::MessageLoop::NestingObserver* observer) {
- message_loop_->RemoveNestingObserver(observer);
+ base::RunLoop::NestingObserver* observer) {
+ base::RunLoop::RemoveNestingObserverOnCurrentThread(observer);
}
base::TimeTicks SchedulerTqmDelegateImpl::NowTicks() {

Powered by Google App Engine
This is Rietveld 408576698