Chromium Code Reviews| Index: Source/platform/heap/PersistentNode.cpp |
| diff --git a/Source/platform/heap/PersistentNode.cpp b/Source/platform/heap/PersistentNode.cpp |
| index aed8a39bcae70c543f5b9b58f96e615780779fd9..6271f7d6ea72c36c01868d2a242d3f18b4db3406 100644 |
| --- a/Source/platform/heap/PersistentNode.cpp |
| +++ b/Source/platform/heap/PersistentNode.cpp |
| @@ -119,6 +119,10 @@ void CrossThreadPersistentRegion::prepareForThreadStateTermination(ThreadState* |
| continue; |
| BasePage* page = pageFromObject(rawObject); |
| ASSERT(page); |
| + // The main thread will upon detach just mark its heap pages as orphaned, |
| + // but not invalidate its CrossThreadPersistent<>s. |
| + if (page->orphaned()) |
| + continue; |
| if (page->heap()->threadState() == threadState) |
|
haraken
2015/08/05 14:22:33
ah, page->heap() should be null for already orphan
|
| persistent->clear(); |
| } |