| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef MarkingVisitorImpl_h | 5 #ifndef MarkingVisitorImpl_h |
| 6 #define MarkingVisitorImpl_h | 6 #define MarkingVisitorImpl_h |
| 7 | 7 |
| 8 #include "platform/heap/Heap.h" | 8 #include "platform/heap/Heap.h" |
| 9 #include "platform/heap/ThreadState.h" | 9 #include "platform/heap/ThreadState.h" |
| 10 #include "platform/heap/Visitor.h" | 10 #include "platform/heap/Visitor.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 ASSERT(header); | 27 ASSERT(header); |
| 28 ASSERT(objectPointer); | 28 ASSERT(objectPointer); |
| 29 if (!toDerived()->shouldMarkObject(objectPointer)) | 29 if (!toDerived()->shouldMarkObject(objectPointer)) |
| 30 return; | 30 return; |
| 31 | 31 |
| 32 // If you hit this ASSERT, it means that there is a dangling pointer | 32 // If you hit this ASSERT, it means that there is a dangling pointer |
| 33 // from a live thread heap to a dead thread heap. We must eliminate | 33 // from a live thread heap to a dead thread heap. We must eliminate |
| 34 // the dangling pointer. | 34 // the dangling pointer. |
| 35 // Release builds don't have the ASSERT, but it is OK because | 35 // Release builds don't have the ASSERT, but it is OK because |
| 36 // release builds will crash in the following header->isMarked() | 36 // release builds will crash in the following header->isMarked() |
| 37 // because all the entries of the orphaned heaps are zapped. | 37 // because all the entries of the orphaned arenas are zapped. |
| 38 ASSERT(!pageFromObject(objectPointer)->orphaned()); | 38 ASSERT(!pageFromObject(objectPointer)->orphaned()); |
| 39 | 39 |
| 40 if (header->isMarked()) | 40 if (header->isMarked()) |
| 41 return; | 41 return; |
| 42 | 42 |
| 43 ASSERT(ThreadState::current()->isInGC()); | 43 ASSERT(ThreadState::current()->isInGC()); |
| 44 ASSERT(toDerived()->getMarkingMode() != Visitor::WeakProcessing); | 44 ASSERT(toDerived()->getMarkingMode() != Visitor::WeakProcessing); |
| 45 | 45 |
| 46 header->mark(); | 46 header->mark(); |
| 47 | 47 |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 private: | 125 private: |
| 126 static void markNoTracingCallback(Visitor* visitor, void* object) | 126 static void markNoTracingCallback(Visitor* visitor, void* object) |
| 127 { | 127 { |
| 128 visitor->markNoTracing(object); | 128 visitor->markNoTracing(object); |
| 129 } | 129 } |
| 130 }; | 130 }; |
| 131 | 131 |
| 132 } // namespace blink | 132 } // namespace blink |
| 133 | 133 |
| 134 #endif | 134 #endif |
| OLD | NEW |