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

Issue 1098083003: Evict Service Worker when reading it from disk cache fails. (Closed)

Created:
5 years, 8 months ago by falken
Modified:
5 years, 8 months ago
Reviewers:
kinuko, nhiroki
CC:
chromium-reviews, michaeln, jsbell+serviceworker_chromium.org, tzik, serviceworker-reviews, jam, nhiroki, darin-cc_chromium.org, horo+watch_chromium.org, kinuko+serviceworker, kinuko+watch
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Evict Service Worker when reading it from disk cache fails. If reading the SW resources from the disk cache fails, we should evict the worker or else we will keep getting the same failure. This patch unsets the worker from the live registration, and then deletes the registration if the SW was the stored version. BUG=448003 Committed: https://crrev.com/64e3ffb1c6b85c7d21e63afcbffe85c5a1112eb7 Cr-Commit-Position: refs/heads/master@{#327000}

Patch Set 1 #

Patch Set 2 : rm friend #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+136 lines, -33 lines) Patch
M content/browser/service_worker/service_worker_browsertest.cc View 3 chunks +82 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_read_from_cache_job.cc View 2 chunks +10 lines, -1 line 0 comments Download
M content/browser/service_worker/service_worker_registration.h View 1 chunk +4 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_registration.cc View 2 chunks +40 lines, -32 lines 2 comments Download

Messages

Total messages: 10 (2 generated)
falken
This reuses the code to "delete version" when activation fails. Really activation failing should not ...
5 years, 8 months ago (2015-04-27 03:09:41 UTC) #2
nhiroki
lgtm https://codereview.chromium.org/1098083003/diff/20001/content/browser/service_worker/service_worker_registration.cc File content/browser/service_worker/service_worker_registration.cc (right): https://codereview.chromium.org/1098083003/diff/20001/content/browser/service_worker/service_worker_registration.cc#newcode306 content/browser/service_worker/service_worker_registration.cc:306: const scoped_refptr<ServiceWorkerVersion>& version) { ServiceWorkerRegisterJob::CompleteInternal seems to have ...
5 years, 8 months ago (2015-04-27 04:24:25 UTC) #3
falken
https://codereview.chromium.org/1098083003/diff/20001/content/browser/service_worker/service_worker_registration.cc File content/browser/service_worker/service_worker_registration.cc (right): https://codereview.chromium.org/1098083003/diff/20001/content/browser/service_worker/service_worker_registration.cc#newcode306 content/browser/service_worker/service_worker_registration.cc:306: const scoped_refptr<ServiceWorkerVersion>& version) { On 2015/04/27 04:24:25, nhiroki wrote: ...
5 years, 8 months ago (2015-04-27 04:58:16 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1098083003/20001
5 years, 8 months ago (2015-04-27 04:58:46 UTC) #6
kinuko
lgtm
5 years, 8 months ago (2015-04-27 05:01:27 UTC) #7
commit-bot: I haz the power
Committed patchset #2 (id:20001)
5 years, 8 months ago (2015-04-27 05:02:06 UTC) #8
commit-bot: I haz the power
Patchset 2 (id:??) landed as https://crrev.com/64e3ffb1c6b85c7d21e63afcbffe85c5a1112eb7 Cr-Commit-Position: refs/heads/master@{#327000}
5 years, 8 months ago (2015-04-27 05:02:54 UTC) #9
falken
5 years, 8 months ago (2015-04-27 08:01:00 UTC) #10
Message was sent while issue was closed.
A revert of this CL (patchset #2 id:20001) has been created in
https://codereview.chromium.org/1056913010/ by falken@chromium.org.

The reason for reverting is: Broke Win 8 Aura content_browsertests

[ RUN      ] ServiceWorkerVersionBrowserTest.ReadResourceFailure
...
[2420:2792:0426/232049:1965296:FATAL:service_worker_registration.cc(44)] Check
failed: ::content::BrowserThread::CurrentlyOn(BrowserThread::IO). Must be called
on Chrome_IOThread; actually called on Unknown Thread.
Backtrace:
	base::debug::StackTrace::StackTrace [0x07FB1081+33]
	logging::LogMessage::~LogMessage [0x07FFD9FF+63]
	content::ServiceWorkerRegistration::~ServiceWorkerRegistration [0x045639F5+293]
	content::ServiceWorkerRegistration::`scalar deleting destructor'
[0x006A087A+26]
	base::RefCounted\u003Ccontent::ServiceWorkerRegistration>::Release
[0x0372C3D2+114]
	scoped_refptr\u003Ccontent::ServiceWorkerRegistration>::Release [0x03D8F94E+14]


http://build.chromium.org/p/chromium.win/builders/Win8%20Aura/builds/29227/st....

Powered by Google App Engine
This is Rietveld 408576698