OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
5 * Copyright (C) 2004-2011, 2014 Apple Inc. All rights reserved. | 5 * Copyright (C) 2004-2011, 2014 Apple Inc. All rights reserved. |
6 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 6 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 // Override operator new to allocate Node subtype objects onto | 177 // Override operator new to allocate Node subtype objects onto |
178 // a dedicated heap. | 178 // a dedicated heap. |
179 GC_PLUGIN_IGNORE("crbug.com/443854") | 179 GC_PLUGIN_IGNORE("crbug.com/443854") |
180 void* operator new(size_t size) | 180 void* operator new(size_t size) |
181 { | 181 { |
182 return allocateObject(size, false); | 182 return allocateObject(size, false); |
183 } | 183 } |
184 static void* allocateObject(size_t size, bool isEager) | 184 static void* allocateObject(size_t size, bool isEager) |
185 { | 185 { |
186 ThreadState* state = ThreadStateFor<ThreadingTrait<Node>::Affinity>::sta
te(); | 186 ThreadState* state = ThreadStateFor<ThreadingTrait<Node>::Affinity>::sta
te(); |
187 return Heap::allocateOnHeapIndex(state, size, isEager ? BlinkGC::EagerSw
eepHeapIndex : BlinkGC::NodeHeapIndex, GCInfoTrait<EventTarget>::index()); | 187 Address address = Heap::allocateOnHeapIndex(state, size, isEager ? Blink
GC::EagerSweepHeapIndex : BlinkGC::NodeHeapIndex, GCInfoTrait<EventTarget>::inde
x()); |
| 188 const char* typeName = WTF_HEAP_PROFILER_TYPE_NAME(Node); |
| 189 HeapAllocHooks::allocationHookIfEnabled(address, size, typeName); |
| 190 return address; |
188 } | 191 } |
189 #else // !ENABLE(OILPAN) | 192 #else // !ENABLE(OILPAN) |
190 // All Nodes are placed in their own heap partition for security. | 193 // All Nodes are placed in their own heap partition for security. |
191 // See http://crbug.com/246860 for detail. | 194 // See http://crbug.com/246860 for detail. |
192 void* operator new(size_t); | 195 void* operator new(size_t); |
193 void operator delete(void*); | 196 void operator delete(void*); |
194 #endif | 197 #endif |
195 | 198 |
196 static void dumpStatistics(); | 199 static void dumpStatistics(); |
197 | 200 |
(...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
928 } // namespace blink | 931 } // namespace blink |
929 | 932 |
930 #ifndef NDEBUG | 933 #ifndef NDEBUG |
931 // Outside the WebCore namespace for ease of invocation from gdb. | 934 // Outside the WebCore namespace for ease of invocation from gdb. |
932 void showNode(const blink::Node*); | 935 void showNode(const blink::Node*); |
933 void showTree(const blink::Node*); | 936 void showTree(const blink::Node*); |
934 void showNodePath(const blink::Node*); | 937 void showNodePath(const blink::Node*); |
935 #endif | 938 #endif |
936 | 939 |
937 #endif // Node_h | 940 #endif // Node_h |
OLD | NEW |