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

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

Issue 1265103003: Invalidate cross-thread persistents on heap termination. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: simplify the invalidation as ref-clearing 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') | Source/platform/heap/PersistentNode.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/heap/PersistentNode.h
diff --git a/Source/platform/heap/PersistentNode.h b/Source/platform/heap/PersistentNode.h
index fa18fa32cff10145a0f7fe1bd0dece9d240dd449..338adf2b4ca7ba114ac580986d81928571d3d502 100644
--- a/Source/platform/heap/PersistentNode.h
+++ b/Source/platform/heap/PersistentNode.h
@@ -77,6 +77,11 @@ public:
return !m_trace;
}
+ void* self() const
+ {
+ return m_self;
+ }
+
private:
// If this PersistentNode is in use:
// - m_self points to the corresponding Persistent handle.
@@ -94,6 +99,7 @@ private:
PersistentNodeSlots* m_next;
PersistentNode m_slot[slotCount];
friend class PersistentRegion;
+ friend class CrossThreadPersistentRegion;
};
// PersistentRegion provides a region of PersistentNodes. PersistentRegion
@@ -139,6 +145,8 @@ public:
int numberOfPersistents();
private:
+ friend CrossThreadPersistentRegion;
+
void ensurePersistentNodeSlots(void*, TraceCallback);
PersistentNode* m_freeListHead;
@@ -170,6 +178,8 @@ public:
m_persistentRegion->tracePersistentNodes(visitor);
}
+ void prepareForThreadStateTermination(ThreadState*);
+
private:
// We don't make CrossThreadPersistentRegion inherit from PersistentRegion
// because we don't want to virtualize performance-sensitive methods
« no previous file with comments | « Source/platform/heap/HeapTest.cpp ('k') | Source/platform/heap/PersistentNode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698