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

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

Issue 1089763002: Oilpan: assert that new Persistents belong to Oilpan threads. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: remove assert in ~PersistentBase Created 5 years, 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/heap/Handle.h
diff --git a/Source/platform/heap/Handle.h b/Source/platform/heap/Handle.h
index 83e4bff467c72d9deea4dfffdc38bd29b01880a8..a0f4bf025494408ca0c3e4601692af838ed0b96f 100644
--- a/Source/platform/heap/Handle.h
+++ b/Source/platform/heap/Handle.h
@@ -179,6 +179,8 @@ protected:
, m_roots(RootsAccessor::roots())
#endif
{
+ // Persistent must belong to a thread that will GC it.
+ ASSERT(m_roots == GlobalPersistents::roots() || ThreadState::current());
typename RootsAccessor::Lock lock;
m_prev = RootsAccessor::roots();
m_next = m_prev->m_next;
@@ -192,6 +194,7 @@ protected:
, m_roots(RootsAccessor::roots())
#endif
{
+ ASSERT(m_roots == GlobalPersistents::roots() || ThreadState::current());
// We don't support allocation of thread local Persistents while doing
// thread shutdown/cleanup.
ASSERT(!ThreadState::current()->isTerminating());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698