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

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

Issue 1845543002: Rename Heap to ThreadHeap (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
OLDNEW
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 "platform/heap/PagePool.h" 5 #include "platform/heap/PagePool.h"
6 6
7 #include "platform/heap/Heap.h" 7 #include "platform/heap/Heap.h"
8 #include "platform/heap/PageMemory.h" 8 #include "platform/heap/PageMemory.h"
9 #include "wtf/Assertions.h" 9 #include "wtf/Assertions.h"
10 10
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 // pages are reused. 94 // pages are reused.
95 // NOTE: We call the destructor before freeing or adding to the 95 // NOTE: We call the destructor before freeing or adding to the
96 // free page pool. 96 // free page pool.
97 PageMemory* memory = page->storage(); 97 PageMemory* memory = page->storage();
98 if (page->isLargeObjectPage()) { 98 if (page->isLargeObjectPage()) {
99 page->~BasePage(); 99 page->~BasePage();
100 delete memory; 100 delete memory;
101 } else { 101 } else {
102 page->~BasePage(); 102 page->~BasePage();
103 clearMemory(memory); 103 clearMemory(memory);
104 Heap::getFreePagePool()->addFreePage(index, memory); 104 ThreadHeap::getFreePagePool()->addFreePage(index, memory);
105 } 105 }
106 106
107 PoolEntry* deadEntry = entry; 107 PoolEntry* deadEntry = entry;
108 entry = entry->next; 108 entry = entry->next;
109 *prevNext = entry; 109 *prevNext = entry;
110 delete deadEntry; 110 delete deadEntry;
111 } 111 }
112 } 112 }
113 } 113 }
114 114
(...skipping 29 matching lines...) Expand all
144 BasePage* page = entry->data; 144 BasePage* page = entry->data;
145 if (page->contains(reinterpret_cast<Address>(object))) 145 if (page->contains(reinterpret_cast<Address>(object)))
146 return true; 146 return true;
147 } 147 }
148 } 148 }
149 return false; 149 return false;
150 } 150 }
151 #endif 151 #endif
152 152
153 } // namespace blink 153 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/heap/MarkingVisitorImpl.h ('k') | third_party/WebKit/Source/platform/heap/RunAllTests.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698