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

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

Issue 1477023003: Refactor the Heap into ThreadHeap to prepare for per thread heaps Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
Index: third_party/WebKit/Source/platform/heap/Handle.h
diff --git a/third_party/WebKit/Source/platform/heap/Handle.h b/third_party/WebKit/Source/platform/heap/Handle.h
index 5b7cb21727fadfbdff3ef708959d5e77d8ab1e40..860c0fe3ff7133fa2351fe1a24fd99ede25ac999 100644
--- a/third_party/WebKit/Source/platform/heap/Handle.h
+++ b/third_party/WebKit/Source/platform/heap/Handle.h
@@ -241,7 +241,7 @@ private:
TraceCallback traceCallback = TraceMethodDelegate<PersistentBase<T, weaknessConfiguration, crossThreadnessConfiguration>, &PersistentBase<T, weaknessConfiguration, crossThreadnessConfiguration>::trace>::trampoline;
if (crossThreadnessConfiguration == CrossThreadPersistentConfiguration) {
- m_persistentNode = Heap::crossThreadPersistentRegion().allocatePersistentNode(this, traceCallback);
+ m_persistentNode = ProcessHeap::crossThreadPersistentRegion().allocatePersistentNode(this, traceCallback);
} else {
ThreadState* state = ThreadStateFor<ThreadingTrait<T>::Affinity>::state();
ASSERT(state->checkThread());
@@ -258,7 +258,7 @@ private:
return;
if (crossThreadnessConfiguration == CrossThreadPersistentConfiguration) {
- Heap::crossThreadPersistentRegion().freePersistentNode(m_persistentNode);
+ ProcessHeap::crossThreadPersistentRegion().freePersistentNode(m_persistentNode);
} else {
ThreadState* state = ThreadStateFor<ThreadingTrait<T>::Affinity>::state();
ASSERT(state->checkThread());
@@ -275,15 +275,16 @@ private:
if (!m_raw)
return;
- // Heap::isHeapObjectAlive(m_raw) checks that m_raw is a traceable
- // object. In other words, it checks that the pointer is either of:
+ // ThreadHeap::isHeapObjectAlive(m_raw) checks that m_raw is a
+ // traceable object. In other words, it checks that the pointer is
+ // either of:
//
// (a) a pointer to the head of an on-heap object.
// (b) a pointer to the head of an on-heap mixin object.
//
- // Otherwise, Heap::isHeapObjectAlive will crash when it calls
+ // Otherwise, ThreadHeap::isHeapObjectAlive will crash when it calls
// header->checkHeader().
- Heap::isHeapObjectAlive(m_raw);
+ ThreadHeap::isHeapObjectAlive(m_raw);
#endif
}
@@ -845,7 +846,7 @@ protected:
// (a) a pointer to the head of an on-heap object.
// (b) a pointer to the head of an on-heap mixin object.
//
- // We can check it by calling Heap::isHeapObjectAlive(m_raw),
+ // We can check it by calling ThreadHeap::isHeapObjectAlive(m_raw),
// but we cannot call it here because it requires to include T.h.
// So we currently only try to implement the check for (a), but do
// not insist that T's definition is in scope.
« no previous file with comments | « third_party/WebKit/Source/platform/heap/GarbageCollected.h ('k') | third_party/WebKit/Source/platform/heap/Heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698