New issue
Advanced search Search tips

Issue 618646 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jul 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

Existing DOM objects should remain functional after CacheStorage.delete()

Project Member Reported by falken@chromium.org, Jun 9 2016

Issue description

From a private correspondence:
"https://slightlyoff.github.io/ServiceWorker/spec/service_worker/#cache-storage-delete
 
After [deleting], the existing DOM objects (i.e. the currently referenced Cache, Request, and Response objects) should remain functional.
 
When I tested this in Firefox, the objects were still available and fully usable. In Chrome, it seems that when I try to get something from the deleted cache object, it throws an error."
 
Cc: jkarlin@chromium.org
Cc: -jkarlin@chromium.org
Owner: jkarlin@chromium.org
Status: Assigned (was: Available)
Should be straight-forward once https://codereview.chromium.org/2056983004/ lands. Just need to move deleting from disk until the last cache reference from a deleted cache is gone.
Status: Started (was: Assigned)
See https://codereview.chromium.org/2111243003
Project Member

Comment 4 by bugdroid1@chromium.org, Jul 6 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0903d9b86a61912208efe95f24d0c79099ebf371

commit 0903d9b86a61912208efe95f24d0c79099ebf371
Author: jkarlin <jkarlin@chromium.org>
Date: Wed Jul 06 02:04:20 2016

[CacheStorage] Keep deleted caches alive until last reference is gone

Currently once a cache is deleted via CacheStorage::Delete the associated
CacheStorageCache is closed and subsequent calls to it fail. This CL keeps
the CacheStorageCache alive, waiting to delete it from disk until after the
last cache handle has been dropped. This change is to conform with the
spec.

BUG= 618646 

Review-Url: https://codereview.chromium.org/2111243003
Cr-Commit-Position: refs/heads/master@{#403837}

[modify] https://crrev.com/0903d9b86a61912208efe95f24d0c79099ebf371/content/browser/cache_storage/cache_storage.cc
[modify] https://crrev.com/0903d9b86a61912208efe95f24d0c79099ebf371/content/browser/cache_storage/cache_storage.h
[modify] https://crrev.com/0903d9b86a61912208efe95f24d0c79099ebf371/content/browser/cache_storage/cache_storage_manager_unittest.cc
[modify] https://crrev.com/0903d9b86a61912208efe95f24d0c79099ebf371/third_party/WebKit/LayoutTests/http/tests/cachestorage/script-tests/cache-storage.js
[modify] https://crrev.com/0903d9b86a61912208efe95f24d0c79099ebf371/third_party/WebKit/LayoutTests/http/tests/cachestorage/serviceworker/cache-storage-expected.txt
[modify] https://crrev.com/0903d9b86a61912208efe95f24d0c79099ebf371/third_party/WebKit/LayoutTests/http/tests/cachestorage/window/cache-storage-expected.txt
[modify] https://crrev.com/0903d9b86a61912208efe95f24d0c79099ebf371/third_party/WebKit/LayoutTests/http/tests/cachestorage/worker/cache-storage-expected.txt

Status: Fixed (was: Started)
Project Member

Comment 6 by bugdroid1@chromium.org, Aug 11 2016

Labels: merge-merged-2785
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6f11a8f8d45b8f49980f3eccf71de1f75618ae07

commit 6f11a8f8d45b8f49980f3eccf71de1f75618ae07
Author: Josh Karlin <jkarlin@chromium.org>
Date: Thu Aug 11 14:26:51 2016

This is a merge into M53 (branch 2785)

[CacheStorage] Check doomed caches first when dropping cache handles

When the last cache handle is dropped, first check if it's a doomed cache
object before removing the cache from the active cache map. Previously we were
checking the other way around, which caused the active cache to be deleted (in
the event that a new cache was created with the same name) instead of the doomed
one.

BUG= 631467 

Review-Url: https://codereview.chromium.org/2179353003
Cr-Commit-Position: refs/heads/master@{#407850}
(cherry picked from commit 956d7aca53f56b5cff228af586ea2e5f895f2e9b)

[CacheStorage] Keep deleted caches alive until last reference is gone

Currently once a cache is deleted via CacheStorage::Delete the associated
CacheStorageCache is closed and subsequent calls to it fail. This CL keeps
the CacheStorageCache alive, waiting to delete it from disk until after the
last cache handle has been dropped. This change is to conform with the
spec.

BUG= 618646 

Review-Url: https://codereview.chromium.org/2111243003
Cr-Commit-Position: refs/heads/master@{#403837}
(cherry picked from commit 0903d9b86a61912208efe95f24d0c79099ebf371)

Review URL: https://codereview.chromium.org/2232223003 .

Cr-Commit-Position: refs/branch-heads/2785@{#562}
Cr-Branched-From: 68623971be0cfc492a2cb0427d7f478e7b214c24-refs/heads/master@{#403382}

[modify] https://crrev.com/6f11a8f8d45b8f49980f3eccf71de1f75618ae07/content/browser/cache_storage/cache_storage.cc
[modify] https://crrev.com/6f11a8f8d45b8f49980f3eccf71de1f75618ae07/content/browser/cache_storage/cache_storage.h
[modify] https://crrev.com/6f11a8f8d45b8f49980f3eccf71de1f75618ae07/content/browser/cache_storage/cache_storage_manager_unittest.cc
[modify] https://crrev.com/6f11a8f8d45b8f49980f3eccf71de1f75618ae07/third_party/WebKit/LayoutTests/http/tests/cachestorage/script-tests/cache-storage.js
[modify] https://crrev.com/6f11a8f8d45b8f49980f3eccf71de1f75618ae07/third_party/WebKit/LayoutTests/http/tests/cachestorage/serviceworker/cache-storage-expected.txt
[modify] https://crrev.com/6f11a8f8d45b8f49980f3eccf71de1f75618ae07/third_party/WebKit/LayoutTests/http/tests/cachestorage/window/cache-storage-expected.txt
[modify] https://crrev.com/6f11a8f8d45b8f49980f3eccf71de1f75618ae07/third_party/WebKit/LayoutTests/http/tests/cachestorage/worker/cache-storage-expected.txt

Sign in to add a comment