Commit f54c00c4 authored by Chris Mumford's avatar Chris Mumford Committed by Commit Bot

Switch CrossThreadBindRepeating to use base::BindReating.

CrossThreadBindRepeating::MakeCrossThreadFunction was calling
base::Bind to create callback. Switching to base::BindRepeating.

Also modified comment in worker_thread.cc to refer to WTF::Bind
so as to not encourage the use of the banned base::Bind* methods
in Blink.

Bug: 1007835
Change-Id: Ib880897af9f78dc5684a7c7b4cd5be557ed5563d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1988507Reviewed-by: default avatarKent Tamura <tkent@chromium.org>
Commit-Queue: Chris Mumford <cmumford@google.com>
Cr-Commit-Position: refs/heads/master@{#728670}
parent cd22c35d
......@@ -127,7 +127,7 @@ class WorkerThread::RefCountedWaitableEvent
// A class that is passed into V8 Interrupt and via a PostTask. Once both have
// run this object will be destroyed in
// PauseOrFreezeWithInterruptDataOnWorkerThread. The V8 API only takes a raw ptr
// otherwise this could have been done with base::Bind and ref counted objects.
// otherwise this could have been done with WTF::Bind and ref counted objects.
class WorkerThread::InterruptData {
public:
InterruptData(WorkerThread* worker_thread, mojom::FrameLifecycleState state)
......
......@@ -75,10 +75,10 @@ auto CrossThreadBindRepeating(FunctionType&& function, Ps&&... parameters) {
std::decay_t<Ps>...>::ok,
"A bound argument uses a bad pattern.");
return internal::MakeCrossThreadFunction(
base::Bind(internal::CoerceFunctorForCrossThreadBind(
std::forward<FunctionType>(function)),
CrossThreadCopier<std::decay_t<Ps>>::Copy(
std::forward<Ps>(parameters))...));
base::BindRepeating(internal::CoerceFunctorForCrossThreadBind(
std::forward<FunctionType>(function)),
CrossThreadCopier<std::decay_t<Ps>>::Copy(
std::forward<Ps>(parameters))...));
}
template <typename FunctionType, typename... Ps>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment