Chromium Code Reviews
Description[Oilpan]: Make StylePropertySet fully garbage collected.
This also required moving ElementData and subclasses to the oilpan heap to
avoid a RefPtr -> Persistent -> Member cycle.
This change makes use of the ephemeron (weak hashmap with fix point)
support to remove elements in the MatchedPropertiesCache during a GC.
This is done by specializing the HashTrait for the value in the hash
map since it is the one with the embedded WeakMember. The specialized
HashTrait's traceInCollection method is called iteratively during GC
tracing to mark the entries that are live in the map. It is also called
during GC weak processing where it must report back whether a specific
element is alive or dead. If dead it is removed from the map.
One caveat is if the map is being traced strongly in which case the
weak members are traced as normal members. This can happen if there
is an iterator to the map on the stack.
I have also changed back to the add/assign pattern for putting entries
into hash maps to avoid the extra lookup I added. This should be safe
since we will have a pointer to the hash map's backing on the stack if
a GC occur so the backing and its entries should be marked strongly,
meaning it should be moved.
R=ager@chromium.org, erik.corry@gmail.com, haraken@chromium.org, oilpan-reviews@chromium.org, tkent@chromium.org, vegorov@chromium.org, zerny@chromium.org
BUG=341815
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=177012
Patch Set 1 #Patch Set 2 : #
Total comments: 27
Patch Set 3 : Review feedback #Patch Set 4 : Fix mac build #
Total comments: 12
Patch Set 5 : Integrate with ephemeron support for removing entries in hashmap under gc #Patch Set 6 : add comment for ShareableElementData new #
Total comments: 17
Patch Set 7 : review feedback #Patch Set 8 : forgot some feedback #
Total comments: 4
Patch Set 9 : More feedback #Patch Set 10 : Fix crash found by svg/custom/invisible-text-after-scrolling.xhtml #
Total comments: 19
Patch Set 11 : rebase and review feedback #Patch Set 12 : fix non-oilpan build #Patch Set 13 : review feedback #Messages
Total messages: 40 (0 generated)
|