Unify and generalize thread static persistent finalization.
Make ThreadState's registerAsStaticReference() generally available,
and not specific to LSan-only registration of static persistents
that must be cleared prior to performing leak detection.
By doing so, it can be used to handle thread-local static persistents
also.
Upon a thread finalizing its ThreadState, these static persistents
will be cleared & released. In order to make that safe and not leave
dangling PersistentNode references around afterwards, generalize
the release mechanism to also clear the Persistent/PersistentCollectionBase
that registered the persistent node.
R=haraken
BUG=
Review URL: https://codereview.chromium.org/1919663002
Cr-Commit-Position: refs/heads/master@{#389448}
8 files changed