Commit c53d9494 authored by Maksim Ivanov's avatar Maksim Ivanov Committed by Chromium LUCI CQ

Fix potential use-after-move in //net/test/embedded_test_server/

Fix use-after-move (potential) bugs found by the
"bugprone-use-after-move" clang-tidy check.

Bug: 1122844
Change-Id: Id6bc188e94a56d9d7a3374a2b585b56ef00b7fe4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2582322
Auto-Submit: Maksim Ivanov <emaxx@chromium.org>
Commit-Queue: Matt Menke <mmenke@chromium.org>
Reviewed-by: default avatarMatt Menke <mmenke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#835724}
parent 84dfd69a
...@@ -672,7 +672,8 @@ void EmbeddedTestServer::HandleRequest(HttpConnection* connection, ...@@ -672,7 +672,8 @@ void EmbeddedTestServer::HandleRequest(HttpConnection* connection,
response = std::move(not_found_response); response = std::move(not_found_response);
} }
response->SendResponse( HttpResponse* const response_ptr = response.get();
response_ptr->SendResponse(
base::BindRepeating(&HttpConnection::SendResponseBytes, base::BindRepeating(&HttpConnection::SendResponseBytes,
connection->GetWeakPtr()), connection->GetWeakPtr()),
base::BindOnce(&EmbeddedTestServer::OnResponseCompleted, base::BindOnce(&EmbeddedTestServer::OnResponseCompleted,
......
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