Don't pass doomed cache around as unique_ptr in callbacks |
||
Issue descriptionReleasing of a doomed handle winds up passing std::unique_ptr<CacheStorageCache> values around in callbacks. Rather than the callback owning the cache, let's keep it in the CacheStorage's doomed_caches_ object so that ownership is always clear.
,
Dec 21 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e8992984e25e4a4fcfb88d3164379754b6df2879 commit e8992984e25e4a4fcfb88d3164379754b6df2879 Author: jkarlin <jkarlin@chromium.org> Date: Wed Dec 21 18:03:48 2016 [CacheStorage] Fix ownership of doomed cache as it's cleaned up Releasing of a doomed handle winds up passing std::unique_ptr<CacheStorageCache> values around in callbacks. Rather than the callback owning the cache, let's keep it in the CacheStorage's doomed_caches_ object so that ownership is always clear and to maintain the invariant that Caches are destructed before their respective CacheStorage is. BUG= 676325 Review-Url: https://codereview.chromium.org/2598643002 Cr-Commit-Position: refs/heads/master@{#440149} [modify] https://crrev.com/e8992984e25e4a4fcfb88d3164379754b6df2879/content/browser/cache_storage/cache_storage.cc [modify] https://crrev.com/e8992984e25e4a4fcfb88d3164379754b6df2879/content/browser/cache_storage/cache_storage.h
,
Dec 21 2016
|
||
►
Sign in to add a comment |
||
Comment 1 by jkarlin@chromium.org
, Dec 21 2016