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 #include "config.h" | 5 #include "config.h" |
6 #include "platform/heap/GCInfo.h" | 6 #include "platform/heap/GCInfo.h" |
7 | 7 |
8 #include "platform/heap/Handle.h" | 8 #include "platform/heap/Handle.h" |
9 #include "platform/heap/Heap.h" | 9 #include "platform/heap/Heap.h" |
10 | 10 |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 | 64 |
65 void GCInfoTable::shutdown() | 65 void GCInfoTable::shutdown() |
66 { | 66 { |
67 free(s_gcInfoTable); | 67 free(s_gcInfoTable); |
68 s_gcInfoTable = nullptr; | 68 s_gcInfoTable = nullptr; |
69 } | 69 } |
70 | 70 |
71 #if ENABLE(ASSERT) | 71 #if ENABLE(ASSERT) |
72 void assertObjectHasGCInfo(const void* payload, size_t gcInfoIndex) | 72 void assertObjectHasGCInfo(const void* payload, size_t gcInfoIndex) |
73 { | 73 { |
74 HeapObjectHeader::fromPayload(payload)->checkHeader(); | 74 ASSERT(HeapObjectHeader::fromPayload(payload)->checkHeader()); |
75 #if !defined(COMPONENT_BUILD) | 75 #if !defined(COMPONENT_BUILD) |
76 // On component builds we cannot compare the gcInfos as they are statically | 76 // On component builds we cannot compare the gcInfos as they are statically |
77 // defined in each of the components and hence will not match. | 77 // defined in each of the components and hence will not match. |
78 BasePage* page = pageFromObject(payload); | 78 BasePage* page = pageFromObject(payload); |
79 ASSERT(!page->orphaned()); | 79 ASSERT(!page->orphaned()); |
80 ASSERT(HeapObjectHeader::fromPayload(payload)->gcInfoIndex() == gcInfoIndex)
; | 80 ASSERT(HeapObjectHeader::fromPayload(payload)->gcInfoIndex() == gcInfoIndex)
; |
81 #endif | 81 #endif |
82 } | 82 } |
83 #endif | 83 #endif |
84 | 84 |
85 } // namespace blink | 85 } // namespace blink |
OLD | NEW |