| 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 } | 82 } |
| 83 #else | 83 #else |
| 84 #define ENABLE_ASAN_CONTAINER_ANNOTATIONS 0 | 84 #define ENABLE_ASAN_CONTAINER_ANNOTATIONS 0 |
| 85 #define ASAN_RETIRE_CONTAINER_ANNOTATION(payload, payloadSize) | 85 #define ASAN_RETIRE_CONTAINER_ANNOTATION(payload, payloadSize) |
| 86 #define ASAN_MARK_LARGE_VECTOR_CONTAINER(heap, largeObject) | 86 #define ASAN_MARK_LARGE_VECTOR_CONTAINER(heap, largeObject) |
| 87 #endif | 87 #endif |
| 88 | 88 |
| 89 namespace blink { | 89 namespace blink { |
| 90 | 90 |
| 91 #if ENABLE(ASSERT) | 91 #if ENABLE(ASSERT) |
| 92 void HeapObjectHeader::putGcGeneration() |
| 93 { |
| 94 m_gcGeneration = Heap::gcGeneration(); |
| 95 } |
| 96 |
| 92 NO_SANITIZE_ADDRESS | 97 NO_SANITIZE_ADDRESS |
| 93 void HeapObjectHeader::zapMagic() | 98 void HeapObjectHeader::clearGcGeneration() |
| 94 { | 99 { |
| 95 ASSERT(checkHeader()); | 100 ASSERT(checkHeader()); |
| 96 m_magic = zappedMagic; | 101 m_gcGeneration = 0; |
| 97 } | 102 } |
| 98 #endif | 103 #endif |
| 99 | 104 |
| 100 void HeapObjectHeader::finalize(Address object, size_t objectSize) | 105 void HeapObjectHeader::finalize(Address object, size_t objectSize) |
| 101 { | 106 { |
| 102 const GCInfo* gcInfo = Heap::gcInfo(gcInfoIndex()); | 107 const GCInfo* gcInfo = Heap::gcInfo(gcInfoIndex()); |
| 103 if (gcInfo->hasFinalizer()) | 108 if (gcInfo->hasFinalizer()) |
| 104 gcInfo->m_finalize(object); | 109 gcInfo->m_finalize(object); |
| 105 | 110 |
| 106 ASAN_RETIRE_CONTAINER_ANNOTATION(object, objectSize); | 111 ASAN_RETIRE_CONTAINER_ANNOTATION(object, objectSize); |
| (...skipping 1477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1584 | 1589 |
| 1585 m_hasEntries = true; | 1590 m_hasEntries = true; |
| 1586 size_t index = hash(address); | 1591 size_t index = hash(address); |
| 1587 ASSERT(!(index & 1)); | 1592 ASSERT(!(index & 1)); |
| 1588 Address cachePage = roundToBlinkPageStart(address); | 1593 Address cachePage = roundToBlinkPageStart(address); |
| 1589 m_entries[index + 1] = m_entries[index]; | 1594 m_entries[index + 1] = m_entries[index]; |
| 1590 m_entries[index] = cachePage; | 1595 m_entries[index] = cachePage; |
| 1591 } | 1596 } |
| 1592 | 1597 |
| 1593 } // namespace blink | 1598 } // namespace blink |
| OLD | NEW |