summaryrefslogtreecommitdiff
path: root/Source/WTF/wtf/FunctionDispatcher.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WTF/wtf/FunctionDispatcher.h')
-rw-r--r--Source/WTF/wtf/FunctionDispatcher.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/Source/WTF/wtf/FunctionDispatcher.h b/Source/WTF/wtf/FunctionDispatcher.h
index 4e202345d..344a16020 100644
--- a/Source/WTF/wtf/FunctionDispatcher.h
+++ b/Source/WTF/wtf/FunctionDispatcher.h
@@ -23,7 +23,11 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
+#ifndef FunctionDispatcher_h
+#define FunctionDispatcher_h
+
#include <functional>
+#include <wtf/Function.h>
#include <wtf/ThreadSafeRefCounted.h>
namespace WTF {
@@ -35,7 +39,7 @@ class FunctionDispatcher : public ThreadSafeRefCounted<FunctionDispatcher> {
public:
WTF_EXPORT_PRIVATE virtual ~FunctionDispatcher();
- virtual void dispatch(std::function<void ()>) = 0;
+ virtual void dispatch(Function<void ()>&&) = 0;
protected:
WTF_EXPORT_PRIVATE FunctionDispatcher();
@@ -44,3 +48,5 @@ protected:
} // namespace WTF
using WTF::FunctionDispatcher;
+
+#endif // FunctionDispatcher_h