| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 MarkingVisitor_h | 5 #ifndef MarkingVisitor_h |
| 6 #define MarkingVisitor_h | 6 #define MarkingVisitor_h |
| 7 | 7 |
| 8 #include "platform/heap/MarkingVisitorImpl.h" | 8 #include "platform/heap/MarkingVisitorImpl.h" |
| 9 | 9 |
| 10 namespace blink { | 10 namespace blink { |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 { | 56 { |
| 57 return Impl::ensureMarked(objectPointer); | 57 return Impl::ensureMarked(objectPointer); |
| 58 } | 58 } |
| 59 | 59 |
| 60 protected: | 60 protected: |
| 61 void registerWeakCellWithCallback(void** cell, WeakCallback callback) overri
de | 61 void registerWeakCellWithCallback(void** cell, WeakCallback callback) overri
de |
| 62 { | 62 { |
| 63 Impl::registerWeakCellWithCallback(cell, callback); | 63 Impl::registerWeakCellWithCallback(cell, callback); |
| 64 } | 64 } |
| 65 | 65 |
| 66 inline bool shouldMarkObject(const void* objectPointer) | 66 inline bool shouldMarkObject(const void* objectPointer) const |
| 67 { | 67 { |
| 68 if (Mode != ThreadLocalMarking) | 68 if (Mode != ThreadLocalMarking) |
| 69 return true; | 69 return true; |
| 70 | 70 |
| 71 BasePage* page = pageFromObject(objectPointer); | 71 BasePage* page = pageFromObject(objectPointer); |
| 72 ASSERT(!page->orphaned()); | 72 ASSERT(!page->orphaned()); |
| 73 // When doing a thread local GC, the marker checks if | 73 // When doing a thread local GC, the marker checks if |
| 74 // the object resides in another thread's heap. If it | 74 // the object resides in another thread's heap. If it |
| 75 // does, the object should not be marked & traced. | 75 // does, the object should not be marked & traced. |
| 76 return page->terminating(); | 76 return page->terminating(); |
| 77 } | 77 } |
| 78 }; | 78 }; |
| 79 | 79 |
| 80 } // namespace blink | 80 } // namespace blink |
| 81 | 81 |
| 82 #endif | 82 #endif |
| OLD | NEW |