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

Unified Diff: third_party/WebKit/Source/platform/WebTaskRunner.cpp

Issue 2959613002: Rename TaskRunner::RunsTasksOnCurrentThread() in //third_party (Closed)
Patch Set: Remove comments Created 3 years, 6 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/WebTaskRunner.cpp
diff --git a/third_party/WebKit/Source/platform/WebTaskRunner.cpp b/third_party/WebKit/Source/platform/WebTaskRunner.cpp
index 8bdfe5747ab8f8103ff2809f558b9332fba83941..e23f058ec06ebf72889c63058b344bef2bfcbc31 100644
--- a/third_party/WebKit/Source/platform/WebTaskRunner.cpp
+++ b/third_party/WebKit/Source/platform/WebTaskRunner.cpp
@@ -111,10 +111,6 @@ TaskHandle::TaskHandle(RefPtr<Runner> runner) : runner_(std::move(runner)) {
DCHECK(runner_);
}
-bool WebTaskRunner::RunsTasksOnCurrentThread() {
- return RunsTasksInCurrentSequence();
-}
-
// Use a custom function for base::Bind instead of convertToBaseCallback to
// avoid copying the closure later in the call chain. Copying the bound state
// can lead to data races with ref counted objects like StringImpl. See
@@ -148,7 +144,7 @@ void WebTaskRunner::PostDelayedTask(const WebTraceLocation& location,
TaskHandle WebTaskRunner::PostCancellableTask(
const WebTraceLocation& location,
std::unique_ptr<WTF::Closure> task) {
- DCHECK(RunsTasksOnCurrentThread());
+ DCHECK(RunsTasksInCurrentSequence());
RefPtr<TaskHandle::Runner> runner =
AdoptRef(new TaskHandle::Runner(std::move(task)));
PostTask(location, WTF::Bind(&TaskHandle::Runner::Run, runner->AsWeakPtr(),
@@ -160,7 +156,7 @@ TaskHandle WebTaskRunner::PostDelayedCancellableTask(
const WebTraceLocation& location,
std::unique_ptr<WTF::Closure> task,
TimeDelta delay) {
- DCHECK(RunsTasksOnCurrentThread());
+ DCHECK(RunsTasksInCurrentSequence());
RefPtr<TaskHandle::Runner> runner =
AdoptRef(new TaskHandle::Runner(std::move(task)));
PostDelayedTask(location,

Powered by Google App Engine
This is Rietveld 408576698