Chromium Code Reviews| 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 e44dc1c6aed4b5fe8d55c150f2a306dcac845b34..8a376954c2284513de8a8c177234171f77f52938 100644 |
| --- a/third_party/WebKit/Source/platform/WebTaskRunner.cpp |
| +++ b/third_party/WebKit/Source/platform/WebTaskRunner.cpp |
| @@ -8,19 +8,24 @@ |
| namespace blink { |
| -void WebTaskRunner::postTask(const WebTraceLocation& location, PassOwnPtr<ClosureTask> task) |
| +void WebTaskRunner::postTask(const WebTraceLocation& location, PassOwnPtr<CrossThreadClosure> task) |
| { |
| - postTask(std::move(location), new blink::Task(std::move(task))); |
| + postTask(std::move(location), new CrossThreadTask(std::move(task))); |
| } |
| -void WebTaskRunner::postDelayedTask(const WebTraceLocation& location, PassOwnPtr <ClosureTask> task, long long delayMs) |
| +void WebTaskRunner::postDelayedTask(const WebTraceLocation& location, PassOwnPtr<CrossThreadClosure> task, long long delayMs) |
| { |
| - postDelayedTask(location, new blink::Task(std::move(task)), delayMs); |
| + postDelayedTask(std::move(location), new CrossThreadTask(std::move(task)), delayMs); |
|
tzik
2016/03/02 11:54:29
std::move(location) takes no effect. Can we just u
hiroshige
2016/03/03 02:21:07
Done.
|
| } |
| -void WebTaskRunner::postDelayedTask(const WebTraceLocation& location, PassOwnPtr <ClosureTask> task, double delayMs) |
| +void WebTaskRunner::postTask(const WebTraceLocation& location, PassOwnPtr<Closure> task) |
| { |
| - postDelayedTask(location, new blink::Task(std::move(task)), delayMs); |
| + postTask(std::move(location), new SameThreadTask(std::move(task))); |
| +} |
| + |
| +void WebTaskRunner::postDelayedTask(const WebTraceLocation& location, PassOwnPtr <Closure> task, long long delayMs) |
| +{ |
| + postDelayedTask(location, new SameThreadTask(std::move(task)), delayMs); |
| } |
| } // namespace blink |