| Index: third_party/WebKit/Source/platform/CrossThreadFunctional.h
|
| diff --git a/third_party/WebKit/Source/platform/ThreadSafeFunctional.h b/third_party/WebKit/Source/platform/CrossThreadFunctional.h
|
| similarity index 72%
|
| rename from third_party/WebKit/Source/platform/ThreadSafeFunctional.h
|
| rename to third_party/WebKit/Source/platform/CrossThreadFunctional.h
|
| index 2f6d94e2df95e2d56c3417ec670a0196afa95d36..c54725f2e87f58931c92101eff7b9f62f4c932f0 100644
|
| --- a/third_party/WebKit/Source/platform/ThreadSafeFunctional.h
|
| +++ b/third_party/WebKit/Source/platform/CrossThreadFunctional.h
|
| @@ -2,8 +2,8 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#ifndef ThreadSafeFunctional_h
|
| -#define ThreadSafeFunctional_h
|
| +#ifndef CrossThreadFunctional_h
|
| +#define CrossThreadFunctional_h
|
|
|
| #include "base/bind.h"
|
| #include "platform/CrossThreadCopier.h"
|
| @@ -12,16 +12,16 @@
|
|
|
| namespace blink {
|
|
|
| -// threadSafeBind() is bind() for cross-thread task posting.
|
| -// threadSafeBind() applies CrossThreadCopier to the arguments.
|
| +// crossThreadBind() is bind() for cross-thread task posting.
|
| +// crossThreadBind() applies CrossThreadCopier to the arguments.
|
| //
|
| // Example:
|
| // void func1(int, const String&);
|
| -// f = threadSafeBind(func1, 42, str);
|
| +// f = crossThreadBind(func1, 42, str);
|
| // func1(42, str2) will be called when |f()| is executed,
|
| // where |str2| is a deep copy of |str| (created by str.isolatedCopy()).
|
| //
|
| -// threadSafeBind(str) is similar to bind(str.isolatedCopy()), but the latter
|
| +// crossThreadBind(str) is similar to bind(str.isolatedCopy()), but the latter
|
| // is NOT thread-safe due to temporary objects (https://crbug.com/390851).
|
| //
|
| // Don't (if you pass the task across threads):
|
| @@ -29,7 +29,7 @@ namespace blink {
|
| // bind(func1, 42, str.isolatedCopy());
|
|
|
| template<typename FunctionType, typename... Ps>
|
| -std::unique_ptr<Function<base::MakeUnboundRunType<FunctionType, Ps...>, WTF::CrossThreadAffinity>> threadSafeBind(
|
| +std::unique_ptr<Function<base::MakeUnboundRunType<FunctionType, Ps...>, WTF::CrossThreadAffinity>> crossThreadBind(
|
| FunctionType function,
|
| Ps&&... parameters)
|
| {
|
| @@ -40,4 +40,4 @@ std::unique_ptr<Function<base::MakeUnboundRunType<FunctionType, Ps...>, WTF::Cro
|
|
|
| } // namespace blink
|
|
|
| -#endif // ThreadSafeFunctional_h
|
| +#endif // CrossThreadFunctional_h
|
|
|