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

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

Issue 1414253004: [Oilpan] Add HeapObjectHeader::gcGeneration() and related methods (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rename Created 5 years, 1 month 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
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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 88
89 namespace blink { 89 namespace blink {
90 90
91 #if ENABLE(ASSERT) 91 #if ENABLE(ASSERT)
92 NO_SANITIZE_ADDRESS 92 NO_SANITIZE_ADDRESS
93 void HeapObjectHeader::zapMagic() 93 void HeapObjectHeader::zapMagic()
94 { 94 {
95 ASSERT(checkHeader()); 95 ASSERT(checkHeader());
96 m_magic = zappedMagic; 96 m_magic = zappedMagic;
97 } 97 }
98
99 void HeapObjectHeader::putGcGeneration()
100 {
101 m_gcGeneration = Heap::gcGeneration();
102 }
103
104 void HeapObjectHeader::clearGcGeneration()
105 {
106 m_gcGeneration = 0;
107 }
98 #endif 108 #endif
99 109
100 void HeapObjectHeader::finalize(Address object, size_t objectSize) 110 void HeapObjectHeader::finalize(Address object, size_t objectSize)
101 { 111 {
102 const GCInfo* gcInfo = Heap::gcInfo(gcInfoIndex()); 112 const GCInfo* gcInfo = Heap::gcInfo(gcInfoIndex());
103 if (gcInfo->hasFinalizer()) 113 if (gcInfo->hasFinalizer())
104 gcInfo->m_finalize(object); 114 gcInfo->m_finalize(object);
105 115
106 ASAN_RETIRE_CONTAINER_ANNOTATION(object, objectSize); 116 ASAN_RETIRE_CONTAINER_ANNOTATION(object, objectSize);
107 } 117 }
(...skipping 1476 matching lines...) Expand 10 before | Expand all | Expand 10 after
1584 1594
1585 m_hasEntries = true; 1595 m_hasEntries = true;
1586 size_t index = hash(address); 1596 size_t index = hash(address);
1587 ASSERT(!(index & 1)); 1597 ASSERT(!(index & 1));
1588 Address cachePage = roundToBlinkPageStart(address); 1598 Address cachePage = roundToBlinkPageStart(address);
1589 m_entries[index + 1] = m_entries[index]; 1599 m_entries[index + 1] = m_entries[index];
1590 m_entries[index] = cachePage; 1600 m_entries[index] = cachePage;
1591 } 1601 }
1592 1602
1593 } // namespace blink 1603 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698