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

Issue 2332333003: Make internals.isPreloaded() to remain the same before/after clearPreloads() (Closed)

Created:
4 years, 3 months ago by hiroshige
Modified:
4 years, 3 months ago
CC:
chromium-reviews, tyoshino+watch_chromium.org, 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

Make internals.isPreloaded() to remain the same before/after clearPreloads() Previously, internals.isPreloaded() depends on |ResourceFetcher::m_preloads|, which is cleared by ResourceFetcher::clearPreloads(). This caused internals.isPreloaded() to turn false after around document's load event. This CL makes ResourceFetcher to keep a set of preloaded URLs (separately from |m_preloads|) if a blink::Internals object is created, and use the set to calculate internals.isPreloaded(). BUG=643621 Committed: https://crrev.com/7978814bba57818814b7a10aa3366e16c6d33784 Cr-Commit-Position: refs/heads/master@{#418821}

Patch Set 1 #

Patch Set 2 : Add test expectation. #

Patch Set 3 : Allow preloads before enableIsPreloadedForTest() #

Total comments: 2

Patch Set 4 : Reflect comments #

Total comments: 2

Patch Set 5 : const auto& #

Messages

Total messages: 22 (11 generated)
hiroshige
yoav@, could you take a look?
4 years, 3 months ago (2016-09-15 06:34:08 UTC) #5
Yoav Weiss
On 2016/09/15 06:34:08, hiroshige wrote: > yoav@, could you take a look? Looks great! Can ...
4 years, 3 months ago (2016-09-15 06:51:25 UTC) #6
Yoav Weiss
https://codereview.chromium.org/2332333003/diff/40001/third_party/WebKit/LayoutTests/fast/preloader/is-preloaded-after-load.html File third_party/WebKit/LayoutTests/fast/preloader/is-preloaded-after-load.html (right): https://codereview.chromium.org/2332333003/diff/40001/third_party/WebKit/LayoutTests/fast/preloader/is-preloaded-after-load.html#newcode27 third_party/WebKit/LayoutTests/fast/preloader/is-preloaded-after-load.html:27: <script src=resources/non-existant.js></script> Can you also test that non-existant.js isPreloaded()?
4 years, 3 months ago (2016-09-15 06:57:03 UTC) #7
hiroshige
> Can you add a test that makes sure Link header based preloads are also ...
4 years, 3 months ago (2016-09-15 08:04:40 UTC) #10
Yoav Weiss
LGTM! :) https://codereview.chromium.org/2332333003/diff/60001/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp File third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp (right): https://codereview.chromium.org/2332333003/diff/60001/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp#newcode888 third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp:888: for (auto resource : *m_preloads) nit: const ...
4 years, 3 months ago (2016-09-15 08:34:32 UTC) #11
Yoav Weiss
On 2016/09/15 08:04:40, hiroshige wrote: > > Can you add a test that makes sure ...
4 years, 3 months ago (2016-09-15 08:35:57 UTC) #12
hiroshige
Thanks! https://codereview.chromium.org/2332333003/diff/60001/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp File third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp (right): https://codereview.chromium.org/2332333003/diff/60001/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp#newcode888 third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp:888: for (auto resource : *m_preloads) On 2016/09/15 08:34:31, ...
4 years, 3 months ago (2016-09-15 08:39:12 UTC) #13
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/2332333003/80001
4 years, 3 months ago (2016-09-15 10:00:48 UTC) #16
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 3 months ago (2016-09-15 10:05:43 UTC) #18
commit-bot: I haz the power
Patchset 5 (id:??) landed as https://crrev.com/7978814bba57818814b7a10aa3366e16c6d33784 Cr-Commit-Position: refs/heads/master@{#418821}
4 years, 3 months ago (2016-09-15 10:07:42 UTC) #20
kouhei (in TOK)
4 years, 3 months ago (2016-09-15 12:20:51 UTC) #22
Message was sent while issue was closed.
lgtm Thanks for the work!

Powered by Google App Engine
This is Rietveld 408576698