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

Issue 1693303002: ServiceWorker: Make ServiceWorkerStorage more self-defensive (Closed)

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

Description

ServiceWorker: Make ServiceWorkerStorage more self-defensive Before this patch, ServiceWorkerStorage provided IsDisabled() to check the storage availability for storage clients and asked them to check it before accessing the storage. However, the convention was not always obeyed and some clients sometimes accessed the disabled storage. This patch stops providing IsDisabled() for the clients, and makes sure to fail operations and return an appropriate error value when the storage is disabled. The clients now no longer take care of the storage availability. BUG=544022 Committed: https://crrev.com/e35424b4497354a8995a5db765b3ba8b03314f4a Cr-Commit-Position: refs/heads/master@{#375547}

Patch Set 1 : #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+250 lines, -137 lines) Patch
M content/browser/service_worker/service_worker_context_core.h View 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_context_core.cc View 7 chunks +7 lines, -27 lines 0 comments Download
M content/browser/service_worker/service_worker_context_watcher.h View 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_context_watcher.cc View 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_context_wrapper.h View 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_context_wrapper.cc View 2 chunks +3 lines, -1 line 0 comments Download
M content/browser/service_worker/service_worker_dispatcher_host.h View 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_dispatcher_host.cc View 4 chunks +6 lines, -11 lines 0 comments Download
M content/browser/service_worker/service_worker_internals_ui.cc View 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_storage.h View 5 chunks +13 lines, -5 lines 0 comments Download
M content/browser/service_worker/service_worker_storage.cc View 12 chunks +30 lines, -15 lines 1 comment Download
M content/browser/service_worker/service_worker_storage_unittest.cc View 25 chunks +185 lines, -78 lines 0 comments Download

Messages

Total messages: 21 (16 generated)
nhiroki
PTAL, thanks!
4 years, 10 months ago (2016-02-15 08:47:29 UTC) #14
falken
lgtm, requiring clients to do things is dangerous... https://codereview.chromium.org/1693303002/diff/100001/content/browser/service_worker/service_worker_storage.cc File content/browser/service_worker/service_worker_storage.cc (right): https://codereview.chromium.org/1693303002/diff/100001/content/browser/service_worker/service_worker_storage.cc#newcode1290 content/browser/service_worker/service_worker_storage.cc:1290: disk_cache_->Disable(); ...
4 years, 10 months ago (2016-02-16 09:16:50 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1693303002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1693303002/100001
4 years, 10 months ago (2016-02-16 09:56:09 UTC) #17
commit-bot: I haz the power
Committed patchset #1 (id:100001)
4 years, 10 months ago (2016-02-16 11:05:59 UTC) #19
commit-bot: I haz the power
4 years, 10 months ago (2016-02-16 22:52:09 UTC) #21
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/e35424b4497354a8995a5db765b3ba8b03314f4a
Cr-Commit-Position: refs/heads/master@{#375547}

Powered by Google App Engine
This is Rietveld 408576698