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

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

Issue 2547053003: s/ passed(...) / WTF::passed(...) / to avoid future ambiguity w/ base::Passed. (Closed)
Patch Set: Rebasing... Created 4 years 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 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 atomicAdd(&m_allocatedSpace, static_cast<long>(delta)); 195 atomicAdd(&m_allocatedSpace, static_cast<long>(delta));
196 ProcessHeap::increaseTotalAllocatedSpace(delta); 196 ProcessHeap::increaseTotalAllocatedSpace(delta);
197 } 197 }
198 198
199 void ThreadHeapStats::decreaseAllocatedSpace(size_t delta) { 199 void ThreadHeapStats::decreaseAllocatedSpace(size_t delta) {
200 atomicSubtract(&m_allocatedSpace, static_cast<long>(delta)); 200 atomicSubtract(&m_allocatedSpace, static_cast<long>(delta));
201 ProcessHeap::decreaseTotalAllocatedSpace(delta); 201 ProcessHeap::decreaseTotalAllocatedSpace(delta);
202 } 202 }
203 203
204 ThreadHeap::ThreadHeap() 204 ThreadHeap::ThreadHeap()
205 : m_regionTree(makeUnique<RegionTree>()), 205 : m_regionTree(WTF::makeUnique<RegionTree>()),
206 m_heapDoesNotContainCache(wrapUnique(new HeapDoesNotContainCache)), 206 m_heapDoesNotContainCache(WTF::wrapUnique(new HeapDoesNotContainCache)),
207 m_safePointBarrier(makeUnique<SafePointBarrier>()), 207 m_safePointBarrier(WTF::makeUnique<SafePointBarrier>()),
208 m_freePagePool(wrapUnique(new FreePagePool)), 208 m_freePagePool(WTF::wrapUnique(new FreePagePool)),
209 m_orphanedPagePool(wrapUnique(new OrphanedPagePool)), 209 m_orphanedPagePool(WTF::wrapUnique(new OrphanedPagePool)),
210 m_markingStack(CallbackStack::create()), 210 m_markingStack(CallbackStack::create()),
211 m_postMarkingCallbackStack(CallbackStack::create()), 211 m_postMarkingCallbackStack(CallbackStack::create()),
212 m_globalWeakCallbackStack(CallbackStack::create()), 212 m_globalWeakCallbackStack(CallbackStack::create()),
213 m_ephemeronStack(CallbackStack::create()) { 213 m_ephemeronStack(CallbackStack::create()) {
214 if (ThreadState::current()->isMainThread()) 214 if (ThreadState::current()->isMainThread())
215 s_mainThreadHeap = this; 215 s_mainThreadHeap = this;
216 216
217 MutexLocker locker(ThreadHeap::allHeapsMutex()); 217 MutexLocker locker(ThreadHeap::allHeapsMutex());
218 allHeaps().add(this); 218 allHeaps().add(this);
219 } 219 }
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
641 ProcessHeap::decreaseTotalMarkedObjectSize(m_stats.markedObjectSize()); 641 ProcessHeap::decreaseTotalMarkedObjectSize(m_stats.markedObjectSize());
642 642
643 m_stats.reset(); 643 m_stats.reset();
644 for (ThreadState* state : m_threads) 644 for (ThreadState* state : m_threads)
645 state->resetHeapCounters(); 645 state->resetHeapCounters();
646 } 646 }
647 647
648 ThreadHeap* ThreadHeap::s_mainThreadHeap = nullptr; 648 ThreadHeap* ThreadHeap::s_mainThreadHeap = nullptr;
649 649
650 } // namespace blink 650 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/heap/GCTaskRunner.h ('k') | third_party/WebKit/Source/platform/heap/HeapTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698