Skip to content

Commit 105c463

Browse files
clarkduvallJohn Abd-El-Malek
authored and
John Abd-El-Malek
committed
Revert "Fix WebRequestProxyingURLLoaderFactory crash after redirect"
This reverts commit 066fecf. Reason for revert: This change had some unintended effects on the interaction of WebRequest and URLLoaderThrottles. Original change's description: > Fix WebRequestProxyingURLLoaderFactory crash after redirect > > When OnReceiveRedirect() is called, we expect to not receive any more > events for that request until FollowRedirect() has been called and the > request is restarted with the new URL. We were not clearing the > bindings in this case, so the URLLoader was staying alive and calling > OnBeforeSendHeaders() on the redirected URL. This could then result in > OnBeforeSendHeaders() being called twice, once for the original request > which gets redirected in //net, and once for the request in the correct > flow when it gets restarted after FollowRedirect(). > > I believe this is pretty similar to the issue described in > http://crbug.com/882661, except this one has to do with normal > redirects instead of webRequest generated redirects. > > The existing redirect tests catch this issue when using the > 'extraHeaders' spec, so I made a version of them that runs with that > enabled. > > Bug: 918761 > Change-Id: Ifa551400e85c13ea3a297fba02a05deb5ccb1821 > Reviewed-on: https://chromium-review.googlesource.com/c/1409915 > Reviewed-by: Ken Rockot <[email protected]> > Commit-Queue: Clark DuVall <[email protected]> > Cr-Commit-Position: refs/heads/master@{#622685} [email protected],[email protected] # Not skipping CQ checks because original CL landed > 1 day ago. Bug: 918761 Change-Id: Ie8449c6fd6c94722ef8eb618ea1a16d429b74bbb Reviewed-on: https://chromium-review.googlesource.com/c/1443913 Reviewed-by: Clark DuVall <[email protected]> Reviewed-by: John Abd-El-Malek <[email protected]> Commit-Queue: Clark DuVall <[email protected]> Cr-Original-Commit-Position: refs/heads/master@{#627183}(cherry picked from commit 6406a9f) Reviewed-on: https://chromium-review.googlesource.com/c/1444812 Cr-Commit-Position: refs/branch-heads/3683@{#54} Cr-Branched-From: e510299-refs/heads/master@{#625896}
1 parent f506ced commit 105c463

File tree

4 files changed

+346
-362
lines changed

4 files changed

+346
-362
lines changed

chrome/browser/extensions/api/web_request/web_request_apitest.cc

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -556,14 +556,6 @@ IN_PROC_BROWSER_TEST_F(ExtensionWebRequestApiTest, WebRequestRedirects) {
556556
<< message_;
557557
}
558558

559-
IN_PROC_BROWSER_TEST_F(ExtensionWebRequestApiTest,
560-
WebRequestRedirectsWithExtraHeaders) {
561-
ASSERT_TRUE(StartEmbeddedTestServer());
562-
ASSERT_TRUE(RunExtensionSubtestWithArg("webrequest", "test_redirects.html",
563-
"useExtraHeaders"))
564-
<< message_;
565-
}
566-
567559
// Tests that redirects from secure to insecure don't send the referrer header.
568560
IN_PROC_BROWSER_TEST_F(ExtensionWebRequestApiTest,
569561
WebRequestRedirectsToInsecure) {
@@ -596,14 +588,6 @@ IN_PROC_BROWSER_TEST_F(ExtensionWebRequestApiTest,
596588
<< message_;
597589
}
598590

599-
IN_PROC_BROWSER_TEST_F(ExtensionWebRequestApiTest,
600-
WebRequestSubresourceRedirectsWithExtraHeaders) {
601-
ASSERT_TRUE(StartEmbeddedTestServer());
602-
ASSERT_TRUE(RunExtensionSubtestWithArg(
603-
"webrequest", "test_subresource_redirects.html", "useExtraHeaders"))
604-
<< message_;
605-
}
606-
607591
// Fails often on Windows dbg bots. http://crbug.com/177163
608592
#if defined(OS_WIN)
609593
#define MAYBE_WebRequestNewTab DISABLED_WebRequestNewTab

0 commit comments

Comments
 (0)