| 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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 // Override operator new to allocate Node subtype objects onto | 175 // Override operator new to allocate Node subtype objects onto |
| 176 // a dedicated heap. | 176 // a dedicated heap. |
| 177 GC_PLUGIN_IGNORE("crbug.com/443854") | 177 GC_PLUGIN_IGNORE("crbug.com/443854") |
| 178 void* operator new(size_t size) | 178 void* operator new(size_t size) |
| 179 { | 179 { |
| 180 return allocateObject(size, false); | 180 return allocateObject(size, false); |
| 181 } | 181 } |
| 182 static void* allocateObject(size_t size, bool isEager) | 182 static void* allocateObject(size_t size, bool isEager) |
| 183 { | 183 { |
| 184 ThreadState* state = ThreadStateFor<ThreadingTrait<Node>::Affinity>::sta
te(); | 184 ThreadState* state = ThreadStateFor<ThreadingTrait<Node>::Affinity>::sta
te(); |
| 185 return Heap::allocateOnArenaIndex(state, size, isEager ? BlinkGC::EagerS
weepArenaIndex : BlinkGC::NodeArenaIndex, GCInfoTrait<EventTarget>::index()); | 185 const char typeName[] = "blink::Node"; |
| 186 return Heap::allocateOnArenaIndex(state, size, isEager ? BlinkGC::EagerS
weepArenaIndex : BlinkGC::NodeArenaIndex, GCInfoTrait<EventTarget>::index(), typ
eName); |
| 186 } | 187 } |
| 187 #else // !ENABLE(OILPAN) | 188 #else // !ENABLE(OILPAN) |
| 188 // All Nodes are placed in their own heap partition for security. | 189 // All Nodes are placed in their own heap partition for security. |
| 189 // See http://crbug.com/246860 for detail. | 190 // See http://crbug.com/246860 for detail. |
| 190 void* operator new(size_t); | 191 void* operator new(size_t); |
| 191 void operator delete(void*); | 192 void operator delete(void*); |
| 192 #endif | 193 #endif |
| 193 | 194 |
| 194 static void dumpStatistics(); | 195 static void dumpStatistics(); |
| 195 | 196 |
| (...skipping 732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 928 } // namespace blink | 929 } // namespace blink |
| 929 | 930 |
| 930 #ifndef NDEBUG | 931 #ifndef NDEBUG |
| 931 // Outside the WebCore namespace for ease of invocation from gdb. | 932 // Outside the WebCore namespace for ease of invocation from gdb. |
| 932 void showNode(const blink::Node*); | 933 void showNode(const blink::Node*); |
| 933 void showTree(const blink::Node*); | 934 void showTree(const blink::Node*); |
| 934 void showNodePath(const blink::Node*); | 935 void showNodePath(const blink::Node*); |
| 935 #endif | 936 #endif |
| 936 | 937 |
| 937 #endif // Node_h | 938 #endif // Node_h |
| OLD | NEW |