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

Unified Diff: third_party/WebKit/Source/platform/heap/Heap.h

Issue 2012763002: Add checks for per thread heap (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | third_party/WebKit/Source/platform/heap/Heap.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/heap/Heap.h
diff --git a/third_party/WebKit/Source/platform/heap/Heap.h b/third_party/WebKit/Source/platform/heap/Heap.h
index 40482db58d209521ff8e441509afa93a356ac2cb..509c3c8433425c715f4f4b742206b408f57c21e3 100644
--- a/third_party/WebKit/Source/platform/heap/Heap.h
+++ b/third_party/WebKit/Source/platform/heap/Heap.h
@@ -202,6 +202,10 @@ public:
// always 'alive'.
if (!object)
return true;
+ // TODO(keishi): some tests create CrossThreadPersistent on non attached threads.
+ if (!ThreadState::current())
+ return true;
+ DCHECK(&ThreadState::current()->heap() == &pageFromObject(object)->arena()->getThreadState()->heap());
return ObjectAliveTrait<T>::isHeapObjectAlive(object);
}
template<typename T>
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/heap/Heap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698