| 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 TraceTraits_h | 5 #ifndef TraceTraits_h |
| 6 #define TraceTraits_h | 6 #define TraceTraits_h |
| 7 | 7 |
| 8 #include "platform/heap/GCInfo.h" | 8 #include "platform/heap/GCInfo.h" |
| 9 #include "platform/heap/Heap.h" | 9 #include "platform/heap/Heap.h" |
| 10 #include "platform/heap/InlinedGlobalMarkingVisitor.h" | 10 #include "platform/heap/InlinedGlobalMarkingVisitor.h" |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 static void mark(VisitorDispatcher visitor, const T* self) | 77 static void mark(VisitorDispatcher visitor, const T* self) |
| 78 { | 78 { |
| 79 if (!self) | 79 if (!self) |
| 80 return; | 80 return; |
| 81 | 81 |
| 82 // If you hit this ASSERT, it means that there is a dangling pointer | 82 // If you hit this ASSERT, it means that there is a dangling pointer |
| 83 // from a live thread heap to a dead thread heap. We must eliminate | 83 // from a live thread heap to a dead thread heap. We must eliminate |
| 84 // the dangling pointer. | 84 // the dangling pointer. |
| 85 // Release builds don't have the ASSERT, but it is OK because | 85 // Release builds don't have the ASSERT, but it is OK because |
| 86 // release builds will crash at the following self->adjustAndMark | 86 // release builds will crash at the following self->adjustAndMark |
| 87 // because all the entries of the orphaned heaps are zeroed out and | 87 // because all the entries of the orphaned arenas are zeroed out and |
| 88 // thus the item does not have a valid vtable. | 88 // thus the item does not have a valid vtable. |
| 89 ASSERT(!pageFromObject(self)->orphaned()); | 89 ASSERT(!pageFromObject(self)->orphaned()); |
| 90 self->adjustAndMark(visitor); | 90 self->adjustAndMark(visitor); |
| 91 } | 91 } |
| 92 }; | 92 }; |
| 93 | 93 |
| 94 template<typename T, bool needsTracing> | 94 template<typename T, bool needsTracing> |
| 95 struct TraceIfEnabled; | 95 struct TraceIfEnabled; |
| 96 | 96 |
| 97 template<typename T> | 97 template<typename T> |
| (...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 585 // since iterating over the hash table backing will find the whole | 585 // since iterating over the hash table backing will find the whole |
| 586 // chain. | 586 // chain. |
| 587 visitor->markNoTracing(node); | 587 visitor->markNoTracing(node); |
| 588 return false; | 588 return false; |
| 589 } | 589 } |
| 590 }; | 590 }; |
| 591 | 591 |
| 592 } // namespace WTF | 592 } // namespace WTF |
| 593 | 593 |
| 594 #endif | 594 #endif |
| OLD | NEW |