Chromium Code Reviews| 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: |