CacheAwareLoading fails on Workers |
|||||
Issue descriptionWhen trying to use: FetchParameters params(resource_request, options); params.SetCacheAwareLoadingEnabled(kIsCacheAwareLoadingEnabled); to fetch resources using WorkerFetchContext, requests always return ERR_CACHE_MISS. I don't know if this is on purpose, but if it's not, someone should look into it. I came up with this because CSSFontFaceSrcValue::Fetch now can be called from workers, and I had to change the if() that enables this to only do so for Document (and not Workers), otherwise I was getting no resources.
,
Oct 6 2017
Does it work if you disable chrome://flags/#enable-off-main-thread-fetch?
,
Oct 6 2017
,
Oct 6 2017
,
Oct 6 2017
It seems that WorkerFetchContext::ShouldLoadNewResource always return false, and ResourceLoader doesn't fallback to normal loading at https://cs.chromium.org/chromium/src/third_party/WebKit/Source/platform/loader/fetch/ResourceLoader.cpp?rcl=e97e928d548569b782ef4df56fe04ea046c3f6fa&l=650
,
Oct 6 2017
Ah, thank you. We don't have MemoryCache on worker, so I think WorkerFetchContext::ShouldLoadNewResource() should always return true.
,
Oct 12 2017
Ok. Sent the CL to set this to true.
,
Oct 12 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/bc4f798718c568ea5abfe7c4b858ffa7f4443d4f commit bc4f798718c568ea5abfe7c4b858ffa7f4443d4f Author: Fernando Serboncini <fserb@chromium.org> Date: Thu Oct 12 23:31:25 2017 WorkerFetchContext::ShouldLoadNewResource returns true Since we don't have MemoryCache on worker, this should always be true. Bug: 772030 Change-Id: I9ed8efdcf2ace829b88219496eabddd66f150ebe Reviewed-on: https://chromium-review.googlesource.com/716596 Commit-Queue: Tsuyoshi Horo <horo@chromium.org> Reviewed-by: Nate Chapin <japhet@chromium.org> Reviewed-by: Tsuyoshi Horo <horo@chromium.org> Cr-Commit-Position: refs/heads/master@{#508534} [modify] https://crrev.com/bc4f798718c568ea5abfe7c4b858ffa7f4443d4f/third_party/WebKit/Source/core/loader/WorkerFetchContext.h
,
Oct 13 2017
I'll close this for now, and reopen later if it stops working again. :) thanks for the help. |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by fs...@chromium.org
, Oct 5 2017