Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Issue 2991443002: The Appcache subresource URL factory needs to inform the URLLoaderClient if there is a failure. (Closed)

Created:
3 years, 5 months ago by ananta
Modified:
3 years, 4 months ago
Reviewers:
michaeln, jam
CC:
chromium-reviews, mlamouri+watch-content_chromium.org, creis+watch_chromium.org, nasko+codewatch_chromium.org, darin-cc_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

The Appcache subresource URL factory needs to inform the URLLoaderClient if there is a failure. Failure cases include, an invalid AppCacheHost instance, failure to create a request handler, etc. We already notify the client about the latter case above. Need to do this for an invalid host as well. This caused the w3schools AppCache test page to spin indefinitely if we pass in an invalid URL. Additionally on the renderer side we need to reset the cached URLLoaderFactory pointer if a null factory is passed in the CommitNavigation IPC. This ensures that the request hits the default network loader. BUG=715632 TEST=Covered by browser test. AppCacheNetworkServiceBrowserTest.VerifySubresourceFactoryClearedOnNewNavigation Review-Url: https://codereview.chromium.org/2991443002 Cr-Commit-Position: refs/heads/master@{#489710} Committed: https://chromium.googlesource.com/chromium/src/+/4a9dd98efab25e78f28b800520c1868aaad2cb1f

Patch Set 1 #

Patch Set 2 : Format changes #

Total comments: 2

Patch Set 3 : Add browser test for verifying that navigating to a TLD within the same host which had an AppCache … #

Total comments: 8

Patch Set 4 : Fix compile failures and address review comments #

Patch Set 5 : Provide a way to turn off certain errors like missing host etc in the factory for tests. #

Total comments: 2

Patch Set 6 : Address review comments. Remove the SetForTesting method added in the previous patch and register a… #

Patch Set 7 : Disable the test for Android #

Unified diffs Side-by-side diffs Delta from patch set Stats (+167 lines, -14 lines) Patch
A content/browser/appcache/appcache_browsertest.cc View 1 2 3 4 5 6 1 chunk +104 lines, -0 lines 0 comments Download
M content/browser/appcache/appcache_subresource_url_factory.h View 1 2 3 4 5 3 chunks +9 lines, -1 line 0 comments Download
M content/browser/appcache/appcache_subresource_url_factory.cc View 5 2 chunks +12 lines, -4 lines 0 comments Download
M content/browser/appcache/appcache_url_loader_job.cc View 1 2 chunks +4 lines, -4 lines 0 comments Download
M content/renderer/render_frame_impl.cc View 4 1 chunk +3 lines, -5 lines 0 comments Download
M content/test/BUILD.gn View 1 2 1 chunk +1 line, -0 lines 0 comments Download
A content/test/data/appcache/logo.png View 1 2 Binary file 0 comments Download
A content/test/data/appcache/simple_page.manifest View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
A content/test/data/appcache/simple_page_no_manifest.html View 1 2 3 4 5 1 chunk +10 lines, -0 lines 0 comments Download
A content/test/data/appcache/simple_page_with_manifest.html View 1 2 1 chunk +22 lines, -0 lines 0 comments Download

Messages

Total messages: 49 (33 generated)
ananta
https://codereview.chromium.org/2991443002/diff/20001/content/browser/appcache/appcache_url_loader_job.cc File content/browser/appcache/appcache_url_loader_job.cc (right): https://codereview.chromium.org/2991443002/diff/20001/content/browser/appcache/appcache_url_loader_job.cc#newcode434 content/browser/appcache/appcache_url_loader_job.cc:434: : (info_ ? info_->http_response_info() : nullptr); info_ was null ...
3 years, 5 months ago (2017-07-21 21:11:34 UTC) #2
jam
nice, content/renderer lgtm Can you add a browsertest for this bug?
3 years, 5 months ago (2017-07-21 21:26:39 UTC) #8
ananta
On 2017/07/21 21:26:39, jam wrote: > nice, content/renderer lgtm > > Can you add a ...
3 years, 5 months ago (2017-07-21 21:49:09 UTC) #9
jam
On 2017/07/21 21:26:39, jam wrote: > nice, content/renderer lgtm > > Can you add a ...
3 years, 5 months ago (2017-07-23 23:06:32 UTC) #12
michaeln
lgtm 2
3 years, 5 months ago (2017-07-24 22:15:05 UTC) #13
ananta
On 2017/07/23 23:06:32, jam wrote: > On 2017/07/21 21:26:39, jam wrote: > > nice, content/renderer ...
3 years, 5 months ago (2017-07-25 00:30:32 UTC) #15
jam
On 2017/07/25 00:30:32, ananta wrote: > On 2017/07/23 23:06:32, jam wrote: > > On 2017/07/21 ...
3 years, 5 months ago (2017-07-25 01:00:05 UTC) #20
ananta
https://codereview.chromium.org/2991443002/diff/40001/content/browser/appcache/appcache_browsertest.cc File content/browser/appcache/appcache_browsertest.cc (right): https://codereview.chromium.org/2991443002/diff/40001/content/browser/appcache/appcache_browsertest.cc#newcode28 content/browser/appcache/appcache_browsertest.cc:28: command_line->AppendSwitchASCII("enable-features", On 2017/07/25 01:00:05, jam wrote: > nit: use ...
3 years, 5 months ago (2017-07-25 01:14:28 UTC) #21
ananta
Added a way to indicate to the AppCache subresource factory that we are in test ...
3 years, 5 months ago (2017-07-25 01:43:48 UTC) #25
jam
https://codereview.chromium.org/2991443002/diff/80001/content/browser/appcache/appcache_subresource_url_factory.h File content/browser/appcache/appcache_subresource_url_factory.h (right): https://codereview.chromium.org/2991443002/diff/80001/content/browser/appcache/appcache_subresource_url_factory.h#newcode71 content/browser/appcache/appcache_subresource_url_factory.h:71: // behaviors like returning errors for a missing host, ...
3 years, 5 months ago (2017-07-25 15:00:52 UTC) #30
ananta
https://codereview.chromium.org/2991443002/diff/80001/content/browser/appcache/appcache_subresource_url_factory.h File content/browser/appcache/appcache_subresource_url_factory.h (right): https://codereview.chromium.org/2991443002/diff/80001/content/browser/appcache/appcache_subresource_url_factory.h#newcode71 content/browser/appcache/appcache_subresource_url_factory.h:71: // behaviors like returning errors for a missing host, ...
3 years, 5 months ago (2017-07-25 22:26:50 UTC) #31
jam
lgtm, thanks!
3 years, 5 months ago (2017-07-26 02:44:44 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2991443002/120001
3 years, 4 months ago (2017-07-26 18:33:57 UTC) #44
commit-bot: I haz the power
Committed patchset #7 (id:120001) as https://chromium.googlesource.com/chromium/src/+/4a9dd98efab25e78f28b800520c1868aaad2cb1f
3 years, 4 months ago (2017-07-26 18:44:57 UTC) #47
mmenke
A revert of this CL (patchset #7 id:120001) has been created in https://codereview.chromium.org/2988923002/ by mmenke@chromium.org. ...
3 years, 4 months ago (2017-07-27 04:46:05 UTC) #48
mmenke
3 years, 4 months ago (2017-07-27 04:48:11 UTC) #49
Message was sent while issue was closed.
On 2017/07/27 04:46:05, mmenke wrote:
> A revert of this CL (patchset #7 id:120001) has been created in
> https://codereview.chromium.org/2988923002/ by mailto:mmenke@chromium.org.
> 
> The reason for reverting is:
>
AppCacheNetworkServiceBrowserTest.VerifySubresourceFactoryClearedOnNewNavigation
> is very flaky, with a lot of red try runs on the CQ and the builders.
> 
> Windows CQ has a 2 hour backlog (Or did earlier), and while this isn't the
only
> reason, it looks like a major contributor..

Sample failures (Both on Mac, but I believe I've seen it on other bots):

https://luci-logdog.appspot.com/v/?s=chromium%2Fbb%2Fchromium.mac%2FMac10.10_...

https://luci-logdog.appspot.com/v/?s=chromium%2Fbb%2Fchromium.mac%2FMac10.12_...

Powered by Google App Engine
This is Rietveld 408576698