Invalidate cross-thread persistents on heap termination.
commit1a29363262feb6e044f0bafc2a554003c8dfa620
authorsigbjornf@opera.com <sigbjornf@opera.com>
Mon, 3 Aug 2015 10:40:46 +0000 (3 10:40 +0000)
committersigbjornf@opera.com <sigbjornf@opera.com>
Mon, 3 Aug 2015 10:40:46 +0000 (3 10:40 +0000)
tree3d789529c46460357d7c21c2befe7a0ec8aaa9b9
parent2604ae47caeb65fb4cbe93939d8011de1a238689
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
third_party/WebKit/Source/platform/heap/HeapTest.cpp
third_party/WebKit/Source/platform/heap/PersistentNode.cpp
third_party/WebKit/Source/platform/heap/PersistentNode.h
third_party/WebKit/Source/platform/heap/ThreadState.cpp
third_party/WebKit/Source/platform/heap/ThreadState.h