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

Issue 2394443002: ServiceWorker: Ensure that a resource list contains the main script (Closed)

Created:
4 years, 2 months ago by nhiroki
Modified:
4 years, 2 months ago
Reviewers:
falken, shimazu
CC:
chromium-reviews, michaeln, jsbell+serviceworker_chromium.org, shimazu+serviceworker_chromium.org, serviceworker-reviews, jam, nhiroki, kinuko+serviceworker, horo+watch_chromium.org, darin-cc_chromium.org, kinuko+watch, tzik, blink-worker-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

ServiceWorker: Ensure that a resource list contains the main script A resource list retrieved from ServiceWorkerDatabase must contain the main script. With this CL, ServiceWorkerDatabase checks it when retrieving resource records from the database and notifies ServiceWorkerStorage of database corruption if the records doesn't contain the main script. ServiceWorkerStorage sweeps out the database in the case. BUG=485900 Committed: https://crrev.com/106d4825d81c9340c295637398c80acd6bfd3496 Cr-Commit-Position: refs/heads/master@{#423071}

Patch Set 1 #

Patch Set 2 : fix #

Total comments: 2

Patch Set 3 : fix tests #

Unified diffs Side-by-side diffs Delta from patch set Stats (+62 lines, -17 lines) Patch
M content/browser/service_worker/service_worker_database.h View 1 1 chunk +2 lines, -2 lines 0 comments Download
M content/browser/service_worker/service_worker_database.cc View 4 chunks +18 lines, -5 lines 0 comments Download
M content/browser/service_worker/service_worker_database_unittest.cc View 1 2 10 chunks +41 lines, -8 lines 0 comments Download
M content/browser/service_worker/service_worker_storage_unittest.cc View 1 2 2 chunks +1 line, -2 lines 0 comments Download

Messages

Total messages: 25 (18 generated)
nhiroki
PTAL. This CL addresses (1, 2) on my comment on the issue: https://bugs.chromium.org/p/chromium/issues/detail?id=485900#c20
4 years, 2 months ago (2016-10-04 05:36:31 UTC) #11
falken
https://codereview.chromium.org/2394443002/diff/40001/content/browser/service_worker/service_worker_database_unittest.cc File content/browser/service_worker/service_worker_database_unittest.cc (right): https://codereview.chromium.org/2394443002/diff/40001/content/browser/service_worker/service_worker_database_unittest.cc#newcode1800 content/browser/service_worker/service_worker_database_unittest.cc:1800: resources.push_back(CreateResource(2, URL(origin, "/resource1"), 2016)); How does this simulate failure? ...
4 years, 2 months ago (2016-10-05 01:35:59 UTC) #14
nhiroki
Thank you! Updated. https://codereview.chromium.org/2394443002/diff/40001/content/browser/service_worker/service_worker_database_unittest.cc File content/browser/service_worker/service_worker_database_unittest.cc (right): https://codereview.chromium.org/2394443002/diff/40001/content/browser/service_worker/service_worker_database_unittest.cc#newcode1800 content/browser/service_worker/service_worker_database_unittest.cc:1800: resources.push_back(CreateResource(2, URL(origin, "/resource1"), 2016)); On 2016/10/05 ...
4 years, 2 months ago (2016-10-05 02:11:48 UTC) #16
falken
lgtm
4 years, 2 months ago (2016-10-05 02:21:14 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2394443002/60001
4 years, 2 months ago (2016-10-05 03:53:55 UTC) #22
commit-bot: I haz the power
Committed patchset #3 (id:60001)
4 years, 2 months ago (2016-10-05 03:58:52 UTC) #23
commit-bot: I haz the power
4 years, 2 months ago (2016-10-05 04:01:08 UTC) #25
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/106d4825d81c9340c295637398c80acd6bfd3496
Cr-Commit-Position: refs/heads/master@{#423071}

Powered by Google App Engine
This is Rietveld 408576698