Invalidate cross-thread persistents on heap termination.

When a thread is detached from Oilpan and its ThreadState is
finalized, arrange for any CrossThreadPersistent<>s pointing
into one of its heaps to be cleared out. Not doing so risks
dangling pointers to be followed upon GC or by anyone else
still keeping these CrossThreadPersistent<>s alive.

The only operation that other threads are allowed over
CrossThreadPersistent<> (CTP) once the ThreadState has been
destructed, is to destruct the CTP.

R=haraken
BUG=515432

Review URL: https://codereview.chromium.org/1265103003

git-svn-id: svn://svn.chromium.org/blink/trunk@199891 bbb929c8-8fbe-4397-9dbb-9b2b20218538
5 files changed