| 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 return; | 64 return; |
| 65 HeapObjectHeader* header = HeapObjectHeader::fromPayload(objectPointer); | 65 HeapObjectHeader* header = HeapObjectHeader::fromPayload(objectPointer); |
| 66 markHeader(header, header->payload(), callback); | 66 markHeader(header, header->payload(), callback); |
| 67 } | 67 } |
| 68 | 68 |
| 69 inline void registerDelayedMarkNoTracing(const void* objectPointer) | 69 inline void registerDelayedMarkNoTracing(const void* objectPointer) |
| 70 { | 70 { |
| 71 Heap::pushPostMarkingCallback(const_cast<void*>(objectPointer), &markNoT
racingCallback); | 71 Heap::pushPostMarkingCallback(const_cast<void*>(objectPointer), &markNoT
racingCallback); |
| 72 } | 72 } |
| 73 | 73 |
| 74 inline void registerWeakMembers(const void* closure, const void* objectPoint
er, WeakPointerCallback callback) | 74 inline void registerWeakMembers(const void* closure, const void* objectPoint
er, WeakCallback callback) |
| 75 { | 75 { |
| 76 Heap::pushWeakPointerCallback(const_cast<void*>(closure), const_cast<voi
d*>(objectPointer), callback); | 76 Heap::pushThreadLocalWeakCallback(const_cast<void*>(closure), const_cast
<void*>(objectPointer), callback); |
| 77 } | 77 } |
| 78 | 78 |
| 79 inline void registerWeakTable(const void* closure, EphemeronCallback iterati
onCallback, EphemeronCallback iterationDoneCallback) | 79 inline void registerWeakTable(const void* closure, EphemeronCallback iterati
onCallback, EphemeronCallback iterationDoneCallback) |
| 80 { | 80 { |
| 81 Heap::registerWeakTable(const_cast<void*>(closure), iterationCallback, i
terationDoneCallback); | 81 Heap::registerWeakTable(const_cast<void*>(closure), iterationCallback, i
terationDoneCallback); |
| 82 } | 82 } |
| 83 | 83 |
| 84 #if ENABLE(ASSERT) | 84 #if ENABLE(ASSERT) |
| 85 inline bool weakTableRegistered(const void* closure) | 85 inline bool weakTableRegistered(const void* closure) |
| 86 { | 86 { |
| (...skipping 27 matching lines...) Expand all Loading... |
| 114 #endif | 114 #endif |
| 115 return true; | 115 return true; |
| 116 } | 116 } |
| 117 | 117 |
| 118 Derived* toDerived() | 118 Derived* toDerived() |
| 119 { | 119 { |
| 120 return static_cast<Derived*>(this); | 120 return static_cast<Derived*>(this); |
| 121 } | 121 } |
| 122 | 122 |
| 123 protected: | 123 protected: |
| 124 inline void registerWeakCellWithCallback(void** cell, WeakPointerCallback ca
llback) | 124 inline void registerWeakCellWithCallback(void** cell, WeakCallback callback) |
| 125 { | 125 { |
| 126 Heap::pushWeakCellPointerCallback(cell, callback); | 126 Heap::pushGlobalWeakCallback(cell, callback); |
| 127 } | 127 } |
| 128 | 128 |
| 129 private: | 129 private: |
| 130 static void markNoTracingCallback(Visitor* visitor, void* object) | 130 static void markNoTracingCallback(Visitor* visitor, void* object) |
| 131 { | 131 { |
| 132 visitor->markNoTracing(object); | 132 visitor->markNoTracing(object); |
| 133 } | 133 } |
| 134 }; | 134 }; |
| 135 | 135 |
| 136 } // namespace blink | 136 } // namespace blink |
| 137 | 137 |
| 138 #endif | 138 #endif |
| OLD | NEW |