| 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 const char typeName[] = "blink::Node"; | 185 return Heap::allocateOnArenaIndex(state, size, isEager ? BlinkGC::EagerS
weepArenaIndex : BlinkGC::NodeArenaIndex, GCInfoTrait<EventTarget>::index()); |
| 186 return Heap::allocateOnArenaIndex(state, size, isEager ? BlinkGC::EagerS
weepArenaIndex : BlinkGC::NodeArenaIndex, GCInfoTrait<EventTarget>::index(), typ
eName); | |
| 187 } | 186 } |
| 188 #else // !ENABLE(OILPAN) | 187 #else // !ENABLE(OILPAN) |
| 189 // All Nodes are placed in their own heap partition for security. | 188 // All Nodes are placed in their own heap partition for security. |
| 190 // See http://crbug.com/246860 for detail. | 189 // See http://crbug.com/246860 for detail. |
| 191 void* operator new(size_t); | 190 void* operator new(size_t); |
| 192 void operator delete(void*); | 191 void operator delete(void*); |
| 193 #endif | 192 #endif |
| 194 | 193 |
| 195 static void dumpStatistics(); | 194 static void dumpStatistics(); |
| 196 | 195 |
| (...skipping 732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 929 } // namespace blink | 928 } // namespace blink |
| 930 | 929 |
| 931 #ifndef NDEBUG | 930 #ifndef NDEBUG |
| 932 // Outside the WebCore namespace for ease of invocation from gdb. | 931 // Outside the WebCore namespace for ease of invocation from gdb. |
| 933 void showNode(const blink::Node*); | 932 void showNode(const blink::Node*); |
| 934 void showTree(const blink::Node*); | 933 void showTree(const blink::Node*); |
| 935 void showNodePath(const blink::Node*); | 934 void showNodePath(const blink::Node*); |
| 936 #endif | 935 #endif |
| 937 | 936 |
| 938 #endif // Node_h | 937 #endif // Node_h |
| OLD | NEW |