mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
refactor: do not use AdaptCallbackForRepeating() in electron_api_url_loader.cc (#45782)
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:
@@ -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(
|
||||
@@ -714,8 +714,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) {
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "base/containers/span.h"
|
||||
#include "gin/converter.h"
|
||||
#include "gin/wrappable.h"
|
||||
#include "shell/common/gin_converters/std_converter.h" // for ConvertToV8(iso, &&)
|
||||
|
||||
namespace gin_helper {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user