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

Unified Diff: third_party/WebKit/Source/platform/heap/MarkingVisitorImpl.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, 11 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/MarkingVisitorImpl.h
diff --git a/third_party/WebKit/Source/platform/heap/MarkingVisitorImpl.h b/third_party/WebKit/Source/platform/heap/MarkingVisitorImpl.h
index 99ac12e300c8915834446928196d9c6684a49882..cd2827bd57923cdf725cd422d8f5e47566a7e8d1 100644
--- a/third_party/WebKit/Source/platform/heap/MarkingVisitorImpl.h
+++ b/third_party/WebKit/Source/platform/heap/MarkingVisitorImpl.h
@@ -38,16 +38,19 @@ protected:
if (header->isMarked())
return;
- ASSERT(ThreadState::current()->isInGC());
+ ASSERT(toDerived()->threadState()->isInGC());
+ if (toDerived()->threadState()->perThreadHeapEnabled())
+ RELEASE_ASSERT(ThreadState::forObject(objectPointer) == toDerived()->threadState());
haraken 2016/01/07 08:06:22 forObject => fromObject
haraken 2016/01/07 08:06:22 Hmm. This RELEASE_ASSERT would be a bit problemati
#if !defined(NDEBUG)
- ASSERT(Heap::findPageFromAddress(header));
+ else
+ ASSERT(Heap::findPageFromAddress(header));
#endif
ASSERT(toDerived()->markingMode() != Visitor::WeakProcessing);
header->mark();
if (callback)
- Heap::pushTraceCallback(const_cast<void*>(objectPointer), callback);
+ Heap::pushTraceCallback(const_cast<void*>(objectPointer), callback, toDerived()->threadState());
}
inline void mark(const void* objectPointer, TraceCallback callback)
@@ -76,13 +79,13 @@ protected:
inline void registerWeakTable(const void* closure, EphemeronCallback iterationCallback, EphemeronCallback iterationDoneCallback)
{
ASSERT(toDerived()->markingMode() != Visitor::WeakProcessing);
- Heap::registerWeakTable(const_cast<void*>(closure), iterationCallback, iterationDoneCallback);
+ Heap::registerWeakTable(const_cast<void*>(closure), iterationCallback, iterationDoneCallback, toDerived()->threadState());
}
#if ENABLE(ASSERT)
inline bool weakTableRegistered(const void* closure)
{
- return Heap::weakTableRegistered(closure);
+ return Heap::weakTableRegistered(closure, toDerived()->threadState());
}
#endif
@@ -120,7 +123,7 @@ protected:
// We don't want to run weak processings when taking a snapshot.
if (toDerived()->markingMode() == Visitor::SnapshotMarking)
return;
- Heap::pushGlobalWeakCallback(cell, callback);
+ Heap::pushGlobalWeakCallback(cell, callback, toDerived()->threadState());
}
private:

Powered by Google App Engine
This is Rietveld 408576698