Skip to content

Commit

Permalink
chore: update patches
Browse files Browse the repository at this point in the history
  • Loading branch information
patchup[bot] authored and ppontes committed Jun 22, 2021
1 parent a1a51fb commit 87bbf12
Showing 1 changed file with 15 additions and 16 deletions.
31 changes: 15 additions & 16 deletions patches/chromium/cherry-pick-910e9e40d376.patch
@@ -1,7 +1,7 @@
From 910e9e40d3767d416a888d9c12b4c9d8a017750c Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Matt Menke <mmenke@chromium.org>
Date: Thu, 10 Jun 2021 07:05:07 +0000
Subject: [PATCH] [M90-LTS] Fix URLLoader cleanup on CorsURLLoaderFactory destruction.
Subject: Fix URLLoader cleanup on CorsURLLoaderFactory destruction.

Destroying one URLLoader can result in other URLLoaders getting errors,
due to to cache interconnectedness. CorsURLLoaderFactory's destructor
Expand Down Expand Up @@ -36,13 +36,12 @@ Reviewed-by: Matt Menke <mmenke@chromium.org>
Commit-Queue: Victor-Gabriel Savu <vsavu@google.com>
Cr-Commit-Position: refs/branch-heads/4430@{#1513}
Cr-Branched-From: e5ce7dc4f7518237b3d9bb93cccca35d25216cbe-refs/heads/master@{#857950}
---

diff --git a/net/http/http_cache_transaction.cc b/net/http/http_cache_transaction.cc
index bb0b938..6a1ccb4 100644
index 663677c5865f6fee039fcd49a0adcd86a94b03ba..610d65e11b6b268d323247927bf2db3869906c90 100644
--- a/net/http/http_cache_transaction.cc
+++ b/net/http/http_cache_transaction.cc
@@ -2115,6 +2115,8 @@
@@ -2101,6 +2101,8 @@ int HttpCache::Transaction::DoHeadersPhaseCannotProceed(int result) {
entry_ = nullptr;
new_entry_ = nullptr;

Expand All @@ -52,10 +51,10 @@ index bb0b938..6a1ccb4 100644
if (result == ERR_CACHE_LOCK_TIMEOUT)
effective_load_flags_ |= LOAD_DISABLE_CACHE;
diff --git a/services/network/cors/cors_url_loader_factory.cc b/services/network/cors/cors_url_loader_factory.cc
index a9f5d70..6e23074 100644
index 93328dbcc3f219a92b3ebcc5c0a3b6af37ebd4a1..60f73825b80ef4c27cf5926e33c351d505389631 100644
--- a/services/network/cors/cors_url_loader_factory.cc
+++ b/services/network/cors/cors_url_loader_factory.cc
@@ -220,7 +220,17 @@
@@ -229,7 +229,17 @@ CorsURLLoaderFactory::CorsURLLoaderFactory(
&CorsURLLoaderFactory::DeleteIfNeeded, base::Unretained(this)));
}

Expand All @@ -75,11 +74,11 @@ index a9f5d70..6e23074 100644
void CorsURLLoaderFactory::OnLoaderCreated(
std::unique_ptr<mojom::URLLoader> loader) {
diff --git a/services/network/cors/cors_url_loader_factory_unittest.cc b/services/network/cors/cors_url_loader_factory_unittest.cc
index 1381128..dd3361f 100644
index 994d6f091e663a2b12d9002fa12526790fdc14e9..292d77116ceef94633e693009ce1b165c8b0af38 100644
--- a/services/network/cors/cors_url_loader_factory_unittest.cc
+++ b/services/network/cors/cors_url_loader_factory_unittest.cc
@@ -7,7 +7,9 @@
#include "base/macros.h"
@@ -8,7 +8,9 @@
#include "base/test/scoped_feature_list.h"
#include "base/test/task_environment.h"
#include "mojo/public/cpp/bindings/remote.h"
+#include "net/base/load_flags.h"
Expand All @@ -88,7 +87,7 @@ index 1381128..dd3361f 100644
#include "net/traffic_annotation/network_traffic_annotation_test_helper.h"
#include "net/url_request/url_request_context.h"
#include "net/url_request/url_request_context_builder.h"
@@ -49,6 +51,9 @@
@@ -50,6 +52,9 @@ class CorsURLLoaderFactoryTest : public testing::Test {
protected:
// testing::Test implementation.
void SetUp() override {
Expand All @@ -98,7 +97,7 @@ index 1381128..dd3361f 100644
network_service_ = NetworkService::CreateForTesting();

auto context_params = mojom::NetworkContextParams::New();
@@ -68,7 +73,7 @@
@@ -69,7 +74,7 @@ class CorsURLLoaderFactoryTest : public testing::Test {
auto factory_params = network::mojom::URLLoaderFactoryParams::New();
factory_params->process_id = kProcessId;
factory_params->request_initiator_origin_lock =
Expand All @@ -107,7 +106,7 @@ index 1381128..dd3361f 100644
auto resource_scheduler_client =
base::MakeRefCounted<ResourceSchedulerClient>(
kProcessId, kRouteId, &resource_scheduler_,
@@ -81,15 +86,25 @@
@@ -82,15 +87,25 @@ class CorsURLLoaderFactoryTest : public testing::Test {
}

void CreateLoaderAndStart(const ResourceRequest& request) {
Expand Down Expand Up @@ -135,7 +134,7 @@ index 1381128..dd3361f 100644
private:
// Test environment.
base::test::TaskEnvironment task_environment_;
@@ -99,15 +114,17 @@
@@ -100,15 +115,17 @@ class CorsURLLoaderFactoryTest : public testing::Test {
std::unique_ptr<NetworkContext> network_context_;
mojo::Remote<mojom::NetworkContext> network_context_remote_;

Expand All @@ -157,7 +156,7 @@ index 1381128..dd3361f 100644

// Holds for allowed origin access lists.
OriginAccessList origin_access_list_;
@@ -118,7 +135,7 @@
@@ -119,7 +136,7 @@ class CorsURLLoaderFactoryTest : public testing::Test {
// Regression test for https://crbug.com/906305.
TEST_F(CorsURLLoaderFactoryTest, DestructionOrder) {
ResourceRequest request;
Expand All @@ -166,7 +165,7 @@ index 1381128..dd3361f 100644
request.mode = mojom::RequestMode::kNoCors;
request.credentials_mode = mojom::CredentialsMode::kOmit;
request.method = net::HttpRequestHeaders::kGetMethod;
@@ -141,5 +158,36 @@
@@ -142,5 +159,36 @@ TEST_F(CorsURLLoaderFactoryTest, DestructionOrder) {
ResetFactory();
}

Expand Down

0 comments on commit 87bbf12

Please sign in to comment.