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

Issue 819513004: Remove wrong ASSERT on request instance for fallback in DocumentThreadableLoader (Closed)

Created:
5 years, 11 months ago by tyoshino (SeeGerritForStatus)
Modified:
5 years, 11 months ago
Reviewers:
horo
CC:
blink-reviews, gavinp+loader_chromium.org, Nate Chapin, tyoshino+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Remove wrong ASSERT on request instance for fallback in DocumentThreadableLoader It's possible that the browser process skips the ServiceWorker and complete request and pass a response with wasFetchedViaServiceWorker set to false to the DocumentThreadableLoader. It's not right to put ASSERT here. This ASSERT was introduced by me on https://src.chromium.org/viewvc/blink?revision=184424&view=revision BUG=none

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -1 line) Patch
M Source/core/loader/DocumentThreadableLoader.cpp View 1 chunk +5 lines, -1 line 0 comments Download

Messages

Total messages: 5 (1 generated)
tyoshino (SeeGerritForStatus)
Investigating if we can write some simpler test to cover this. But could you please ...
5 years, 11 months ago (2015-01-09 10:01:00 UTC) #2
mlamouri (slow - plz ping)
On 2015/01/09 at 10:01:00, tyoshino wrote: > Investigating if we can write some simpler test ...
5 years, 11 months ago (2015-01-12 10:27:54 UTC) #3
horo
On 2015/01/12 10:27:54, Mounir Lamouri wrote: > On 2015/01/09 at 10:01:00, tyoshino wrote: > > ...
5 years, 11 months ago (2015-01-13 03:55:37 UTC) #4
tyoshino (SeeGerritForStatus)
5 years, 11 months ago (2015-01-13 05:51:08 UTC) #5
FTR, here's what we've discussed:

- ResourceDispatcherHostImpl::BeingRequest() makes RESOURCE_TYPE_FAVICON
requests skip ServiceWorkers. This is inconsistent with the condition in the
DocumentThreadableLoader (DocumentThreadableLoader is used by
AssociatedURLLoader. DocumentThreadableLoader expects that the browser skips the
ServiceWorker only when skip_service_worker is set or is_sync_load is set), and
so, we hit the ASSERT.

- ServiceWorkerURLRequestJob sets response_type_ to FALLBACK_TO_NETWORK when
request_mode_ is not FETCH_REQUEST_MODE_CORS or
FETCH_REQUEST_MODE_CORS_WITH_FORCED_PREFLIGHT. DocumentThreadableLoader sets
mode to either of them. So, we should never hit this.

- ServiceWorkerControlleeRequestHandler sets response_type_ to
FALLBACK_TO_NETWORK when the ServiceWorker is not ready or stale, or it's not
allowed to forward the request to the ServiceWorker. In such a case, in the
first place, we shouldn't consult the ServiceWorker. If we hit the ASSERT, it
means that something is broken in the ServiceWorker availability checking code.

So, we need to mark the request with skipServiceWorker flag before it goes
through DocumentThreadableLoader.

Powered by Google App Engine
This is Rietveld 408576698