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

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

Issue 2518253002: Move Partition Allocator into Chromium base. (Closed)
Patch Set: Move OOM_CRASH into its own, more specific header. Fixes Windows build. 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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/CallbackStack.h" 5 #include "platform/heap/CallbackStack.h"
6 #include "wtf/PtrUtil.h" 6 #include "wtf/PtrUtil.h"
7 #include "wtf/allocator/PageAllocator.h"
8 #include "wtf/allocator/Partitions.h" 7 #include "wtf/allocator/Partitions.h"
9 8
10 namespace blink { 9 namespace blink {
11 10
12 CallbackStackMemoryPool& CallbackStackMemoryPool::instance() { 11 CallbackStackMemoryPool& CallbackStackMemoryPool::instance() {
13 DEFINE_STATIC_LOCAL(CallbackStackMemoryPool, memoryPool, ()); 12 DEFINE_STATIC_LOCAL(CallbackStackMemoryPool, memoryPool, ());
14 return memoryPool; 13 return memoryPool;
15 } 14 }
16 15
17 void CallbackStackMemoryPool::initialize() { 16 void CallbackStackMemoryPool::initialize() {
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 bool CallbackStack::hasCallbackForObject(const void* object) { 208 bool CallbackStack::hasCallbackForObject(const void* object) {
210 for (Block* current = m_first; current; current = current->next()) { 209 for (Block* current = m_first; current; current = current->next()) {
211 if (current->hasCallbackForObject(object)) 210 if (current->hasCallbackForObject(object))
212 return true; 211 return true;
213 } 212 }
214 return false; 213 return false;
215 } 214 }
216 #endif 215 #endif
217 216
218 } // namespace blink 217 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698