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) |