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

Unified Diff: mojo/public/cpp/bindings/thread_safe_interface_ptr.h

Issue 2888053002: Rename TaskRunner::RunsTasksOnCurrentThread() in //extensions, //headless, //mojo (Closed)
Patch Set: rebase 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: mojo/public/cpp/bindings/thread_safe_interface_ptr.h
diff --git a/mojo/public/cpp/bindings/thread_safe_interface_ptr.h b/mojo/public/cpp/bindings/thread_safe_interface_ptr.h
index 740687f37984f4864f9ddebf445e897bb346b8f1..98b8cae9634ba871b024692a2280cebe6f3af4c1 100644
--- a/mojo/public/cpp/bindings/thread_safe_interface_ptr.h
+++ b/mojo/public/cpp/bindings/thread_safe_interface_ptr.h
@@ -117,7 +117,7 @@ class ThreadSafeForwarder : public MessageReceiverWithResponder {
SyncCallRestrictions::AssertSyncCallAllowed();
// If the InterfacePtr is bound to this thread, dispatch it directly.
- if (task_runner_->RunsTasksOnCurrentThread()) {
+ if (task_runner_->RunsTasksInCurrentSequence()) {
forward_with_responder_.Run(std::move(*message), std::move(responder));
return true;
}
@@ -335,7 +335,7 @@ class ThreadSafeInterfacePtrBase
~PtrWrapper() {}
void Bind(PtrInfoType ptr_info) {
- DCHECK(task_runner_->RunsTasksOnCurrentThread());
+ DCHECK(task_runner_->RunsTasksInCurrentSequence());
ptr_.Bind(std::move(ptr_info));
}
@@ -350,7 +350,7 @@ class ThreadSafeInterfacePtrBase
}
void DeleteOnCorrectThread() const {
- if (!task_runner_->RunsTasksOnCurrentThread()) {
+ if (!task_runner_->RunsTasksInCurrentSequence()) {
// NOTE: This is only called when there are no more references to
// |this|, so binding it unretained is both safe and necessary.
task_runner_->PostTask(FROM_HERE,
« no previous file with comments | « mojo/public/cpp/bindings/tests/bind_task_runner_unittest.cc ('k') | mojo/public/cpp/system/simple_watcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698