refactor: do not use AdaptCallbackForRepeating() in electron_api_url_loader.cc (#45771)

refactor: do not use AdaptCallbackForRepeating in electron_api_url_loader.cc
This commit is contained in:
Charles Kerr 2025-02-24 10:09:01 -06:00 committed by GitHub
parent f3259be73c
commit 69eb076bca
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View file

@ -438,7 +438,7 @@ void SimpleURLLoaderWrapper::OnAuthRequired(
net::AuthCredentials(username_str, password_str));
},
std::move(auth_responder));
Emit("login", auth_info, base::AdaptCallbackForRepeating(std::move(cb)));
Emit("login", auth_info, std::move(cb));
}
void SimpleURLLoaderWrapper::OnSSLCertificateError(
@ -716,8 +716,7 @@ void SimpleURLLoaderWrapper::OnDataReceived(std::string_view string_view,
v8::HandleScope handle_scope(isolate);
auto array_buffer = v8::ArrayBuffer::New(isolate, string_view.size());
memcpy(array_buffer->Data(), string_view.data(), string_view.size());
Emit("data", array_buffer,
base::AdaptCallbackForRepeating(std::move(resume)));
Emit("data", array_buffer, std::move(resume));
}
void SimpleURLLoaderWrapper::OnComplete(bool success) {