Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(53)

Unified Diff: Source/platform/heap/PersistentNode.cpp

Issue 1271243003: CrossThreadPersistent invalidation: add missing orphaned check. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: add unit test Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/platform/heap/HeapTest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
}
« no previous file with comments | « Source/platform/heap/HeapTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698