Use mutable lambda captures in AsyncDnsResolver::Start().
Otherwise, the captured variables are immutable, so a subsequent std::move() silently degrades to a copy. -- Add missing () for consistency with other no-arg lambda captures. Bug: webrtc:374845009 Change-Id: I205589ff8047446918a45203a22620846b271187 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/366280 Reviewed-by: Harald Alvestrand <hta@webrtc.org> Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org> Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org> Cr-Commit-Position: refs/heads/main@{#43289}
This commit is contained in:
parent
7085a884aa
commit
a21152ab85
@ -155,9 +155,9 @@ void AsyncDnsResolver::Start(const rtc::SocketAddress& addr,
|
||||
// We assume that the caller task queue is still around if the
|
||||
// AsyncDnsResolver has not been destroyed.
|
||||
state->Finish([this, error, flag, caller_task_queue,
|
||||
addresses = std::move(addresses)]() {
|
||||
addresses = std::move(addresses)]() mutable {
|
||||
caller_task_queue->PostTask(
|
||||
SafeTask(flag, [this, error, addresses = std::move(addresses)] {
|
||||
SafeTask(flag, [this, error, addresses = std::move(addresses)]() {
|
||||
RTC_DCHECK_RUN_ON(&result_.sequence_checker_);
|
||||
result_.addresses_ = addresses;
|
||||
result_.error_ = error;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user