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

Unified Diff: third_party/WebKit/Source/wtf/Functional.h

Issue 1770553002: Simplify createCrossThreadTask() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Kuroneko_EC5_CleanupCrossThreadAccess
Patch Set: Rebase Created 4 years, 7 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
« no previous file with comments | « third_party/WebKit/Source/core/dom/ExecutionContextTask.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/wtf/Functional.h
diff --git a/third_party/WebKit/Source/wtf/Functional.h b/third_party/WebKit/Source/wtf/Functional.h
index 1878058ca3129b6ea492b1fc958633ff409a2d0b..ef6fdd02a63c2bcce1bcb37ee2555c7abce38968 100644
--- a/third_party/WebKit/Source/wtf/Functional.h
+++ b/third_party/WebKit/Source/wtf/Functional.h
@@ -124,6 +124,7 @@ class FunctionWrapper<R(*)(Parameters...)> {
DISALLOW_NEW();
public:
typedef R ResultType;
+ static const size_t numberOfArguments = sizeof...(Parameters);
explicit FunctionWrapper(R(*function)(Parameters...))
: m_function(function)
@@ -147,6 +148,8 @@ class FunctionWrapper<R(C::*)(Parameters...)> {
DISALLOW_NEW();
public:
typedef R ResultType;
+ // + 1 is for |this| as an argument.
+ static const size_t numberOfArguments = sizeof...(Parameters) + 1;
explicit FunctionWrapper(R(C::*function)(Parameters...))
: m_function(function)
« no previous file with comments | « third_party/WebKit/Source/core/dom/ExecutionContextTask.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698