css/resolver: Refactor weaknesss in MatchedPropertiesCache
MatchedPropertiesCache was the single user of custom weakness using HashTraits. Supporting custom weakness in hash tables is responsible for a lot of complications in the tracing protocol. MatchedPropertiesCache was using weakness to hold alive a cached entry as long as all of its matched properties are alive. Once a single matched property dies the entry was removed. This can be modeled using a custom weakness callback that performs the same logic. Cached entry don't have any outgoing edges except for their cached matched properties, so ephemeron semantic is not required. Using a custom weak callback is also faster because the callback is only executed once and not part of the ephemeron fixed point protocol. The cached entry is unlinked using the weak callback and collected on next GC cylce. After this conversion, custom weakness can be removed from hash traits. Weakness should always go through already supported types (e.g. WeakMember). Bug: 1019191 Change-Id: I52b7b24dcba8a3aaca896f86a351da665667fcf9 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1886611 Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Reviewed-by:Omer Katz <omerkatz@chromium.org> Reviewed-by:
Kentaro Hara <haraken@chromium.org> Cr-Commit-Position: refs/heads/master@{#710693}
Showing
Please register or sign in to comment