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

Unified Diff: Source/platform/Task.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 | « Source/platform/PermissionCallbacks.cpp ('k') | Source/platform/heap/HeapTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/Task.h
diff --git a/Source/platform/Task.h b/Source/platform/Task.h
index 6941c7702a6cecc837f33825a06b49af2a703a8b..b4fbafb9ed7c37e0e609da56e261d41e21fa3172 100644
--- a/Source/platform/Task.h
+++ b/Source/platform/Task.h
@@ -33,23 +33,25 @@
#include "public/platform/WebThread.h"
#include "wtf/Functional.h"
+#include "wtf/OwnPtr.h"
+#include "wtf/PassOwnPtr.h"
namespace blink {
class Task : public WebThread::Task {
public:
- explicit Task(const Closure& closure)
+ explicit Task(PassOwnPtr<Closure> closure)
: m_closure(closure)
{
}
virtual void run() override
{
- m_closure();
+ (*m_closure)();
}
private:
- Closure m_closure;
+ OwnPtr<Closure> m_closure;
};
} // namespace blink
« no previous file with comments | « Source/platform/PermissionCallbacks.cpp ('k') | Source/platform/heap/HeapTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698