New issue
Advanced search Search tips

Issue 772030 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Oct 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

CacheAwareLoading fails on Workers

Project Member Reported by fs...@chromium.org, Oct 5 2017

Issue description

When 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.



 

Comment 1 by fs...@chromium.org, Oct 5 2017

Status: Assigned (was: Available)

Comment 2 by horo@chromium.org, Oct 6 2017

Does it work if you disable chrome://flags/#enable-off-main-thread-fetch?

Comment 3 by horo@chromium.org, Oct 6 2017

Components: Blink>Loader

Comment 4 by horo@chromium.org, Oct 6 2017

Cc: shaochuan@chromium.org
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

Comment 6 by horo@chromium.org, Oct 6 2017

Ah, thank you.

We don't have MemoryCache on worker, so I think WorkerFetchContext::ShouldLoadNewResource() should always return true.

Comment 7 by fs...@chromium.org, Oct 12 2017

Owner: fs...@chromium.org
Status: Started (was: Assigned)
Ok. Sent the CL to set this to true.
Project Member

Comment 8 by bugdroid1@chromium.org, 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

Comment 9 by fs...@chromium.org, Oct 13 2017

Status: Fixed (was: Started)
I'll close this for now, and reopen later if it stops working again. :) thanks for the help.

Sign in to add a comment