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

refactor: do not use AdaptCallbackForRepeating in electron_api_url_loader.cc

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
This commit is contained in:
trop[bot] 2025-02-24 14:42:28 -06:00 committed by GitHub
parent 24bc99cc2f
commit aa584714cd
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) {