| 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..b0ff0cccd3b82f97ace0f236c00f41478a3781ee 100644
|
| --- a/third_party/WebKit/Source/wtf/Functional.h
|
| +++ b/third_party/WebKit/Source/wtf/Functional.h
|
| @@ -60,12 +60,12 @@ namespace WTF {
|
| // 1) Pass by rvalue reference.
|
| //
|
| // void yourFunction(Argument&& argument) { ... }
|
| -// OwnPtr<Function<void(Argument&&)>> functor = bind<Argument&&>(yourFunction);
|
| +// std::unique_ptr<Function<void(Argument&&)>> functor = bind<Argument&&>(yourFunction);
|
| //
|
| // 2) Pass by value.
|
| //
|
| // void yourFunction(Argument argument) { ... }
|
| -// OwnPtr<Function<void(Argument)>> functor = bind<Argument>(yourFunction);
|
| +// std::unique_ptr<Function<void(Argument)>> functor = bind<Argument>(yourFunction);
|
| //
|
| // Note that with the latter there will be *two* move constructions happening, because there needs to be at least one
|
| // intermediary function call taking an argument of type "Argument" (i.e. passed by value). The former case does not
|
| @@ -84,7 +84,7 @@ namespace WTF {
|
| // }
|
| //
|
| // ...
|
| -// OwnPtr<Function<void()>> functor = bind(yourFunction, passed(Argument()));
|
| +// std::unique_ptr<Function<void()>> functor = bind(yourFunction, passed(Argument()));
|
| // ...
|
| // (*functor)();
|
| //
|
| @@ -166,6 +166,12 @@ public:
|
| }
|
|
|
| template <typename... IncomingParameters>
|
| + R operator()(const std::unique_ptr<C>& c, IncomingParameters&&... parameters)
|
| + {
|
| + return (c.get()->*m_function)(std::forward<IncomingParameters>(parameters)...);
|
| + }
|
| +
|
| + template <typename... IncomingParameters>
|
| R operator()(const WeakPtr<C>& c, IncomingParameters&&... parameters)
|
| {
|
| C* obj = c.get();
|
|
|