OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 NO_SANITIZE_ADDRESS | 91 NO_SANITIZE_ADDRESS |
92 void HeapObjectHeader::zapMagic() | 92 void HeapObjectHeader::zapMagic() |
93 { | 93 { |
94 ASSERT(checkHeader()); | 94 ASSERT(checkHeader()); |
95 m_magic = zappedMagic; | 95 m_magic = zappedMagic; |
96 } | 96 } |
97 #endif | 97 #endif |
98 | 98 |
99 void HeapObjectHeader::finalize(Address object, size_t objectSize) | 99 void HeapObjectHeader::finalize(Address object, size_t objectSize) |
100 { | 100 { |
| 101 HeapAllocHooks::freeHookIfEnabled(object); |
101 const GCInfo* gcInfo = Heap::gcInfo(gcInfoIndex()); | 102 const GCInfo* gcInfo = Heap::gcInfo(gcInfoIndex()); |
102 if (gcInfo->hasFinalizer()) | 103 if (gcInfo->hasFinalizer()) |
103 gcInfo->m_finalize(object); | 104 gcInfo->m_finalize(object); |
104 | 105 |
105 ASAN_RETIRE_CONTAINER_ANNOTATION(object, objectSize); | 106 ASAN_RETIRE_CONTAINER_ANNOTATION(object, objectSize); |
106 } | 107 } |
107 | 108 |
108 BaseHeap::BaseHeap(ThreadState* state, int index) | 109 BaseHeap::BaseHeap(ThreadState* state, int index) |
109 : m_firstPage(nullptr) | 110 : m_firstPage(nullptr) |
110 , m_firstUnsweptPage(nullptr) | 111 , m_firstUnsweptPage(nullptr) |
(...skipping 1491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1602 | 1603 |
1603 m_hasEntries = true; | 1604 m_hasEntries = true; |
1604 size_t index = hash(address); | 1605 size_t index = hash(address); |
1605 ASSERT(!(index & 1)); | 1606 ASSERT(!(index & 1)); |
1606 Address cachePage = roundToBlinkPageStart(address); | 1607 Address cachePage = roundToBlinkPageStart(address); |
1607 m_entries[index + 1] = m_entries[index]; | 1608 m_entries[index + 1] = m_entries[index]; |
1608 m_entries[index] = cachePage; | 1609 m_entries[index] = cachePage; |
1609 } | 1610 } |
1610 | 1611 |
1611 } // namespace blink | 1612 } // namespace blink |
OLD | NEW |