Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: third_party/WebKit/Source/platform/heap/HeapPage.cpp

Issue 2723743003: Use the Oilpan heap canary only on 64-bit. (Closed)
Patch Set: Hide the implementation of |getMagic|, too, unless 64-bit. Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/platform/heap/HeapPage.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 static_cast<LargeObjectPage*>(largePage)->setIsVectorBackingPage(); \ 81 static_cast<LargeObjectPage*>(largePage)->setIsVectorBackingPage(); \
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(arena, largeObject) 86 #define ASAN_MARK_LARGE_VECTOR_CONTAINER(arena, largeObject)
87 #endif 87 #endif
88 88
89 namespace blink { 89 namespace blink {
90 90
91 #if DCHECK_IS_ON() 91 #if DCHECK_IS_ON() && CPU(64BIT)
92 NO_SANITIZE_ADDRESS 92 NO_SANITIZE_ADDRESS
93 void HeapObjectHeader::zapMagic() { 93 void HeapObjectHeader::zapMagic() {
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 HeapAllocHooks::freeHookIfEnabled(object); 100 HeapAllocHooks::freeHookIfEnabled(object);
101 const GCInfo* gcInfo = ThreadHeap::gcInfo(gcInfoIndex()); 101 const GCInfo* gcInfo = ThreadHeap::gcInfo(gcInfoIndex());
(...skipping 1724 matching lines...) Expand 10 before | Expand all | Expand 10 after
1826 1826
1827 m_hasEntries = true; 1827 m_hasEntries = true;
1828 size_t index = hash(address); 1828 size_t index = hash(address);
1829 ASSERT(!(index & 1)); 1829 ASSERT(!(index & 1));
1830 Address cachePage = roundToBlinkPageStart(address); 1830 Address cachePage = roundToBlinkPageStart(address);
1831 m_entries[index + 1] = m_entries[index]; 1831 m_entries[index + 1] = m_entries[index];
1832 m_entries[index] = cachePage; 1832 m_entries[index] = cachePage;
1833 } 1833 }
1834 1834
1835 } // namespace blink 1835 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/heap/HeapPage.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698