DescriptionTrace ScriptWrappableVisitor.m_markingDeque by oilpan gc
This cl has two parts:
1. Make ScriptWrappableVisitor.m_markingDeque part of the root set for the
oilpan gc so wrapper marked objects will not be collected.
Without this cl, v8 can detect wrapper during incremental marking, but the v8
scavenger is free to collect the wrapper. Subsequent oilpan gc will collect
ScriptWrappable and recorded internal fields of v8 wrapper are no longer valid.
With this cl, oilpan will not collect ScriptWrappables if they are in the
marking deque. Other slightly more complicated approach would be to cleanup the
marking deque after oilpan gc and remove dead objects.
2. Add freshly associated wrappers to the ScriptWrappableVisitor.m_markingDeque
to ensure they will be processed when black allocation in v8 is on.
When black allcation is on, v8 creates new objects black, and completely skips
any processing, including wrapper detection. Such object would be undetected and
not traced at all. Because of that, on all wrapper associations (which
happen shortly after creation) we put objects into the marking deque. This way
we make sure the object will be traced.
LOG=no
BUG=468240
Committed: https://crrev.com/b2bf69081a17b107dc4ec9c2cc5dd64d961c7e0d
Cr-Commit-Position: refs/heads/master@{#399141}
Patch Set 1 #Patch Set 2 : Do not add already black objects #Patch Set 3 : Only record wrappers when tracing #
Total comments: 4
Patch Set 4 : Cleanup marking deque after oilpan gc #Patch Set 5 : Polish #
Total comments: 8
Patch Set 6 : Polish #Patch Set 7 : Polish #
Total comments: 7
Patch Set 8 : Invalidate deque for all threads #Patch Set 9 : Polish #
Total comments: 5
Patch Set 10 : Move tracing of active script wrappable to epilogue #Patch Set 11 : Fix callers of registerTraceDOMWrappers #Messages
Total messages: 29 (8 generated)
|