Note: at this time, this issue doesn't affect any recent regressions, because this issue addresses a long-term issue of MemoryCache and no commits are made.
Committed: https://codereview.chromium.org/1807323002/
(I forgot BUG=603462 so pasted the following here manually)
Make Reference from Inspector to Resource weak, remove removedFromMemoryCache()
Previously, Inspector and CSSStyleSheet-related classes depend on whether
Resource is in MemoryCache and track Resource's eviction from MemoryCache by
removedFromMemoryCache().
This CL replaces the condition of "whether Resource is in MemoryCache" with
"whether Resource is not garbage collected":
- Replaces Resource::removedFromMemoryCache() with newly-added Resource's
prefinalizer, Resource::willDestroyResource().
- Make |NetworkResourcesData::ResourceData::m_cachedResource| a WeakMember,
so that Resource's prefinalizer is called even if it is referenced by
|m_cachedResource|.
- Removes some checks of MemoryCache from Inspector, and
replaces StyleSheetContents::isInMemoryCache() with
StyleSheetContents::isReferencedFromResource().
This is Step 1a of Weak MemoryCache:
https://docs.google.com/document/d/1Pj4vzxzCKC_11SugdJ_x7wq7ErE-pHtf4w4FLKdcF7g/edit?usp=sharing
BUG=603462
Committed: https://crrev.com/9b939698486aae30f47b68806ed70d660dea776e
Cr-Commit-Position: refs/heads/master@{#392562}
Added +rkaplow@ as the Finch ambassador.
Because the field-trial at Comment #14 is canary/dev-only experiment, this crbug entry has no Type-Launch- labels.
I found I did something inconsistent in https://codereview.chromium.org/2411243004:
The CL Description says:
This CL removes most of the control mechanisms ... (except one using
|m_lastDecodedAccessTime|), including ... |m_lastDecodedAccessTime| ...
And |m_lastDecodedAccessTime| itself remains in the code base but the logic for that was removed.
Comment 1 by kbr@chromium.org
, Apr 14 2016