chore: bump chromium to 104.0.5073.0 (main) (#34272)
This commit is contained in:
parent
3849d19e14
commit
470396d6ac
112 changed files with 663 additions and 589 deletions
|
@ -554,13 +554,6 @@ void ElectronURLLoaderFactory::StartLoadingStream(
|
|||
} else if (stream->IsNullOrUndefined()) {
|
||||
mojo::Remote<network::mojom::URLLoaderClient> client_remote(
|
||||
std::move(client));
|
||||
// "data" was explicitly passed as null or undefined, assume the user wants
|
||||
// to send an empty body.
|
||||
//
|
||||
// Note that We must submit a empty body otherwise NetworkService would
|
||||
// crash.
|
||||
client_remote->OnReceiveResponse(std::move(head),
|
||||
mojo::ScopedDataPipeConsumerHandle());
|
||||
mojo::ScopedDataPipeProducerHandle producer;
|
||||
mojo::ScopedDataPipeConsumerHandle consumer;
|
||||
if (mojo::CreateDataPipe(nullptr, producer, consumer) != MOJO_RESULT_OK) {
|
||||
|
@ -568,8 +561,13 @@ void ElectronURLLoaderFactory::StartLoadingStream(
|
|||
network::URLLoaderCompletionStatus(net::ERR_INSUFFICIENT_RESOURCES));
|
||||
return;
|
||||
}
|
||||
// "data" was explicitly passed as null or undefined, assume the user wants
|
||||
// to send an empty body.
|
||||
//
|
||||
// Note that We must submit a empty body otherwise NetworkService would
|
||||
// crash.
|
||||
client_remote->OnReceiveResponse(std::move(head), std::move(consumer));
|
||||
producer.reset(); // The data pipe is empty.
|
||||
client_remote->OnStartLoadingResponseBody(std::move(consumer));
|
||||
client_remote->OnComplete(network::URLLoaderCompletionStatus(net::OK));
|
||||
return;
|
||||
} else if (!stream->IsObject()) {
|
||||
|
@ -605,8 +603,6 @@ void ElectronURLLoaderFactory::SendContents(
|
|||
|
||||
// Add header to ignore CORS.
|
||||
head->headers->AddHeader("Access-Control-Allow-Origin", "*");
|
||||
client_remote->OnReceiveResponse(std::move(head),
|
||||
mojo::ScopedDataPipeConsumerHandle());
|
||||
|
||||
// Code below follows the pattern of data_url_loader_factory.cc.
|
||||
mojo::ScopedDataPipeProducerHandle producer;
|
||||
|
@ -617,7 +613,7 @@ void ElectronURLLoaderFactory::SendContents(
|
|||
return;
|
||||
}
|
||||
|
||||
client_remote->OnStartLoadingResponseBody(std::move(consumer));
|
||||
client_remote->OnReceiveResponse(std::move(head), std::move(consumer));
|
||||
|
||||
auto write_data = std::make_unique<WriteData>();
|
||||
write_data->client = std::move(client_remote);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue