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

Unified Diff: Source/wtf/MainThread.cpp

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/wtf/MainThread.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/wtf/MainThread.cpp
diff --git a/Source/wtf/MainThread.cpp b/Source/wtf/MainThread.cpp
index 83a14aefb290aed59263a3af01fd5e6466dad94f..17b823e9eb24fd1ceb756dfccedaec791f1b501f 100644
--- a/Source/wtf/MainThread.cpp
+++ b/Source/wtf/MainThread.cpp
@@ -66,9 +66,9 @@ static void callFunctionObject(void* context)
delete function;
}
-void callOnMainThread(const Function<void()>& function)
+void callOnMainThread(PassOwnPtr<Function<void()>> function)
{
- callOnMainThread(callFunctionObject, new Function<void()>(function));
+ callOnMainThread(callFunctionObject, function.leakPtr());
}
bool isMainThread()
« no previous file with comments | « Source/wtf/MainThread.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698