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

Issue 355163003: Don't prematurely delete script resources when registration is deleted (Closed)

Created:
6 years, 5 months ago by falken
Modified:
6 years, 5 months ago
Reviewers:
michaeln
CC:
chromium-reviews, jsbell+serviceworker_chromium.org, tzik, serviceworker-reviews, jam, kinuko+serviceworker, nhiroki, darin-cc_chromium.org, horo+watch_chromium.org, alecflett+watch_chromium.org
Project:
chromium
Visibility:
Public.

Description

Don't prematurely delete script resources when registration is deleted A page must be controlled by the same worker for its lifetime, so as long as a worker controls a page its resources shouldn't be deleted. BUG=388095 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=280976

Patch Set 1 #

Total comments: 6

Patch Set 2 : redesign #

Total comments: 10

Patch Set 3 : review feedbacK #

Patch Set 4 : win build fix #

Patch Set 5 : better comment #

Patch Set 6 : really fix win build #

Total comments: 16

Patch Set 7 : sync #

Patch Set 8 : patch for landing #

Unified diffs Side-by-side diffs Delta from patch set Stats (+502 lines, -196 lines) Patch
M content/browser/service_worker/service_worker_context_core.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M content/browser/service_worker/service_worker_database.h View 1 2 3 4 5 6 7 2 chunks +17 lines, -11 lines 0 comments Download
M content/browser/service_worker/service_worker_database.cc View 1 2 3 4 5 6 7 4 chunks +6 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_database_unittest.cc View 1 2 3 4 5 6 7 38 chunks +187 lines, -75 lines 0 comments Download
M content/browser/service_worker/service_worker_handle.h View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M content/browser/service_worker/service_worker_storage.h View 1 2 3 10 chunks +37 lines, -24 lines 0 comments Download
M content/browser/service_worker/service_worker_storage.cc View 1 2 3 4 5 6 7 9 chunks +64 lines, -23 lines 0 comments Download
M content/browser/service_worker/service_worker_storage_unittest.cc View 1 2 3 4 5 6 7 3 chunks +180 lines, -49 lines 0 comments Download
M content/browser/service_worker/service_worker_version.h View 1 1 chunk +6 lines, -5 lines 0 comments Download
M content/browser/service_worker/service_worker_version.cc View 1 2 1 chunk +3 lines, -7 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
falken
Michael, Just sharing an early patch. It's not ready for review but comments are welcome. ...
6 years, 5 months ago (2014-06-27 12:55:37 UTC) #1
michaeln
On 2014/06/27 12:55:37, falken wrote: > Michael, > > Just sharing an early patch. It's ...
6 years, 5 months ago (2014-06-28 01:47:25 UTC) #2
michaeln
thnx for the early preview https://codereview.chromium.org/355163003/diff/1/content/browser/service_worker/service_worker_database.cc File content/browser/service_worker/service_worker_database.cc (left): https://codereview.chromium.org/355163003/diff/1/content/browser/service_worker/service_worker_database.cc#oldcode629 content/browser/service_worker/service_worker_database.cc:629: // Delete resource records ...
6 years, 5 months ago (2014-06-28 02:29:32 UTC) #3
falken
Thanks for the detailed explanations! How does this look? I was originally a bit reluctant ...
6 years, 5 months ago (2014-06-30 10:41:28 UTC) #4
michaeln
this is lookin pretty good > I was originally a bit reluctant to allow the ...
6 years, 5 months ago (2014-06-30 22:31:55 UTC) #5
falken
Thanks, PTAL https://codereview.chromium.org/355163003/diff/20001/content/browser/service_worker/service_worker_context_observer.h File content/browser/service_worker/service_worker_context_observer.h (right): https://codereview.chromium.org/355163003/diff/20001/content/browser/service_worker/service_worker_context_observer.h#newcode63 content/browser/service_worker/service_worker_context_observer.h:63: virtual void OnNoControllees(int64 version_id) {} On 2014/06/30 ...
6 years, 5 months ago (2014-07-01 06:17:40 UTC) #6
michaeln
lgtm modulo some nits https://codereview.chromium.org/355163003/diff/100001/content/browser/service_worker/service_worker_database.h File content/browser/service_worker/service_worker_database.h (right): https://codereview.chromium.org/355163003/diff/100001/content/browser/service_worker/service_worker_database.h#newcode120 content/browser/service_worker/service_worker_database.h:120: // Returns OK they are ...
6 years, 5 months ago (2014-07-01 20:54:07 UTC) #7
falken
Thanks, addressed comments and will CQ. The updated patch contains a bit of new test ...
6 years, 5 months ago (2014-07-02 04:04:25 UTC) #8
falken
The CQ bit was checked by falken@chromium.org
6 years, 5 months ago (2014-07-02 04:05:05 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/falken@chromium.org/355163003/140001
6 years, 5 months ago (2014-07-02 04:05:34 UTC) #10
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: win_chromium_rel on tryserver.chromium ...
6 years, 5 months ago (2014-07-02 05:46:07 UTC) #11
commit-bot: I haz the power
Change committed as 280976
6 years, 5 months ago (2014-07-02 07:47:25 UTC) #12
falken
6 years, 5 months ago (2014-07-03 04:40:34 UTC) #13
Message was sent while issue was closed.
Actually I'm not sure what you mean by this:

> yup, we'll have to be careful when it comes to automatically purging after a
> restart, that mechanism can't accidentally purge these newly purgeable
resources
> that are still lingering

A browser restart means new document loads so they'll use the updated version,
no?

i.e., you can delete the purgeable resources when the browser starts up?

(was thinking of looking into that for my next patch)

Powered by Google App Engine
This is Rietveld 408576698