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

Issue 1615803004: Avoid double download for late discovered link preload resources. (Closed)

Created:
4 years, 11 months ago by Yoav Weiss
Modified:
4 years, 11 months ago
Reviewers:
Nate Chapin
CC:
chromium-reviews, tyoshino+watch_chromium.org, Yoav Weiss, gavinp+loader_chromium.org, blink-reviews, loading-reviews+fetch_chromium.org, Nate Chapin
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Avoid double download for late discovered link preload resources. `<link rel=preload>` based resources are could result in a double download if they weren't discovered by the parser by the time parsing ended. If they we're not used by that time, they were removed from mem cache entirely. That behavior is compatible with preloadScanner discovered resources, but it is not compatible with rel preload, which is intended to be used on exactly the resources that are not present in markup and therefore will be discovered late. This CL fixes the issue, by avoiding to remove from memcache resources that are there due to `<link rel=preload>`. BUG=579914 Committed: https://crrev.com/7deab7b0ed91ae7e453919ceef37e1b6074b7c1a Cr-Commit-Position: refs/heads/master@{#371061}

Patch Set 1 #

Patch Set 2 : Permit memcache removal when ResourceFetcher is destroyed #

Total comments: 6

Patch Set 3 : review comments #

Patch Set 4 : Added comment #

Patch Set 5 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+27 lines, -5 lines) Patch
A third_party/WebKit/LayoutTests/http/tests/preload/single_download_late_used_preload.html View 1 chunk +19 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Document.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/fetch/ResourceFetcher.h View 1 2 3 4 1 chunk +3 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp View 1 2 3 4 3 chunks +4 lines, -3 lines 0 comments Download

Messages

Total messages: 10 (3 generated)
Yoav Weiss
Hey Nate :) We've discussed this one yesterday on irc, but things are slightly different ...
4 years, 11 months ago (2016-01-21 12:44:04 UTC) #2
Nate Chapin
https://codereview.chromium.org/1615803004/diff/20001/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp File third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp (right): https://codereview.chromium.org/1615803004/diff/20001/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp#newcode843 third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp:843: if (!deleted && resource->preloadResult() == Resource::PreloadNotReferenced && (type == ...
4 years, 11 months ago (2016-01-21 19:07:14 UTC) #3
Yoav Weiss
https://codereview.chromium.org/1615803004/diff/20001/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp File third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp (right): https://codereview.chromium.org/1615803004/diff/20001/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp#newcode843 third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp:843: if (!deleted && resource->preloadResult() == Resource::PreloadNotReferenced && (type == ...
4 years, 11 months ago (2016-01-21 20:34:09 UTC) #4
Nate Chapin
lgtm
4 years, 11 months ago (2016-01-22 17:38:49 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1615803004/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1615803004/80001
4 years, 11 months ago (2016-01-22 21:42:20 UTC) #7
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 11 months ago (2016-01-22 22:30:32 UTC) #8
commit-bot: I haz the power
4 years, 11 months ago (2016-01-22 22:31:43 UTC) #10
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/7deab7b0ed91ae7e453919ceef37e1b6074b7c1a
Cr-Commit-Position: refs/heads/master@{#371061}

Powered by Google App Engine
This is Rietveld 408576698