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

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

Issue 1754183002: Rename BaseHeap to BaseArena (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
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 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 CallbackStack::Item* slot = s_globalWeakCallbackStack->allocateEntry(); 263 CallbackStack::Item* slot = s_globalWeakCallbackStack->allocateEntry();
264 *slot = CallbackStack::Item(cell, callback); 264 *slot = CallbackStack::Item(cell, callback);
265 } 265 }
266 266
267 void Heap::pushThreadLocalWeakCallback(void* closure, void* object, WeakCallback callback) 267 void Heap::pushThreadLocalWeakCallback(void* closure, void* object, WeakCallback callback)
268 { 268 {
269 ASSERT(ThreadState::current()->isInGC()); 269 ASSERT(ThreadState::current()->isInGC());
270 270
271 // Trace should never reach an orphaned page. 271 // Trace should never reach an orphaned page.
272 ASSERT(!Heap::orphanedPagePool()->contains(object)); 272 ASSERT(!Heap::orphanedPagePool()->contains(object));
273 ThreadState* state = pageFromObject(object)->heap()->threadState(); 273 ThreadState* state = pageFromObject(object)->arena()->threadState();
274 state->pushThreadLocalWeakCallback(closure, callback); 274 state->pushThreadLocalWeakCallback(closure, callback);
275 } 275 }
276 276
277 bool Heap::popAndInvokeGlobalWeakCallback(Visitor* visitor) 277 bool Heap::popAndInvokeGlobalWeakCallback(Visitor* visitor)
278 { 278 {
279 if (CallbackStack::Item* item = s_globalWeakCallbackStack->pop()) { 279 if (CallbackStack::Item* item = s_globalWeakCallbackStack->pop()) {
280 item->call(visitor); 280 item->call(visitor);
281 return true; 281 return true;
282 } 282 }
283 return false; 283 return false;
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
688 size_t Heap::s_wrapperCountAtLastGC = 0; 688 size_t Heap::s_wrapperCountAtLastGC = 0;
689 size_t Heap::s_collectedWrapperCount = 0; 689 size_t Heap::s_collectedWrapperCount = 0;
690 size_t Heap::s_partitionAllocSizeAtLastGC = 0; 690 size_t Heap::s_partitionAllocSizeAtLastGC = 0;
691 double Heap::s_estimatedMarkingTimePerByte = 0.0; 691 double Heap::s_estimatedMarkingTimePerByte = 0.0;
692 bool Heap::s_isLowEndDevice = false; 692 bool Heap::s_isLowEndDevice = false;
693 #if ENABLE(ASSERT) 693 #if ENABLE(ASSERT)
694 uint16_t Heap::s_gcGeneration = 0; 694 uint16_t Heap::s_gcGeneration = 0;
695 #endif 695 #endif
696 696
697 } // namespace blink 697 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/heap/Heap.h ('k') | third_party/WebKit/Source/platform/heap/HeapAllocator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698