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

Unified Diff: Source/core/dom/ExecutionContextTask.h

Issue 705003002: Change the return type of WTF::bind() to |OwnPtr<Function>| (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Reflect comments from yhirano Created 6 years, 1 month 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
« no previous file with comments | « no previous file | Source/core/dom/Microtask.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/ExecutionContextTask.h
diff --git a/Source/core/dom/ExecutionContextTask.h b/Source/core/dom/ExecutionContextTask.h
index 60507a20abf84940a56d8705e36e86e1fe655f85..ba33d6e0b4773eed548ae74ebf5dddf14026f261 100644
--- a/Source/core/dom/ExecutionContextTask.h
+++ b/Source/core/dom/ExecutionContextTask.h
@@ -54,15 +54,15 @@ public:
// Do not use |create| other than in createCrossThreadTask and
// createSameThreadTask.
// See http://crbug.com/390851
- static PassOwnPtr<CallClosureTask> create(const Closure& closure)
+ static PassOwnPtr<CallClosureTask> create(PassOwnPtr<Closure> closure)
{
return adoptPtr(new CallClosureTask(closure));
}
- virtual void performTask(ExecutionContext*) override { m_closure(); }
+ virtual void performTask(ExecutionContext*) override { (*m_closure)(); }
private:
- explicit CallClosureTask(const Closure& closure) : m_closure(closure) { }
- Closure m_closure;
+ explicit CallClosureTask(PassOwnPtr<Closure> closure) : m_closure(closure) { }
+ OwnPtr<Closure> m_closure;
};
// Create tasks passed within a single thread.
« no previous file with comments | « no previous file | Source/core/dom/Microtask.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698