| 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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 WILL_HAVE_ALL_INSTANCES_ON_SAME_GC_HEAP(Node); | 116 WILL_HAVE_ALL_INSTANCES_ON_SAME_GC_HEAP(Node); |
| 117 | 117 |
| 118 #if ENABLE(OILPAN) | 118 #if ENABLE(OILPAN) |
| 119 #define NODE_BASE_CLASSES public EventTarget | 119 #define NODE_BASE_CLASSES public EventTarget |
| 120 #else | 120 #else |
| 121 // TreeShared should be the last to pack TreeShared::m_refCount and | 121 // TreeShared should be the last to pack TreeShared::m_refCount and |
| 122 // Node::m_nodeFlags on 64bit platforms. | 122 // Node::m_nodeFlags on 64bit platforms. |
| 123 #define NODE_BASE_CLASSES public EventTarget, public TreeShared<Node> | 123 #define NODE_BASE_CLASSES public EventTarget, public TreeShared<Node> |
| 124 #endif | 124 #endif |
| 125 | 125 |
| 126 class GC_PLUGIN_IGNORE("crbug.com/443854") Node : NODE_BASE_CLASSES { | 126 class Node : NODE_BASE_CLASSES { |
| 127 DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED(TreeShared<Node>); | 127 DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED(TreeShared<Node>); |
| 128 DEFINE_WRAPPERTYPEINFO(); | 128 DEFINE_WRAPPERTYPEINFO(); |
| 129 friend class TreeScope; | 129 friend class TreeScope; |
| 130 friend class TreeScopeAdopter; | 130 friend class TreeScopeAdopter; |
| 131 public: | 131 public: |
| 132 enum NodeType { | 132 enum NodeType { |
| 133 ELEMENT_NODE = 1, | 133 ELEMENT_NODE = 1, |
| 134 ATTRIBUTE_NODE = 2, | 134 ATTRIBUTE_NODE = 2, |
| 135 TEXT_NODE = 3, | 135 TEXT_NODE = 3, |
| 136 CDATA_SECTION_NODE = 4, | 136 CDATA_SECTION_NODE = 4, |
| (...skipping 23 matching lines...) Expand all Loading... |
| 160 DOCUMENT_POSITION_CONTAINS = 0x08, | 160 DOCUMENT_POSITION_CONTAINS = 0x08, |
| 161 DOCUMENT_POSITION_CONTAINED_BY = 0x10, | 161 DOCUMENT_POSITION_CONTAINED_BY = 0x10, |
| 162 DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 0x20, | 162 DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 0x20, |
| 163 }; | 163 }; |
| 164 | 164 |
| 165 #if ENABLE(OILPAN) | 165 #if ENABLE(OILPAN) |
| 166 // Node is now a GarbageCollected<EventTarget> instead of a GarbageCollected
<Node>, which confuses Oilpan's | 166 // Node is now a GarbageCollected<EventTarget> instead of a GarbageCollected
<Node>, which confuses Oilpan's |
| 167 // static type dispatching of typed heap for Nodes. We override GarbageColle
cted<>'s operator new here, to put | 167 // static type dispatching of typed heap for Nodes. We override GarbageColle
cted<>'s operator new here, to put |
| 168 // Node descendants into typed heap for Nodes. <http://crbug.com/443854> | 168 // Node descendants into typed heap for Nodes. <http://crbug.com/443854> |
| 169 using GarbageCollectedBase = EventTarget; | 169 using GarbageCollectedBase = EventTarget; |
| 170 |
| 171 GC_PLUGIN_IGNORE("crbug.com/443854") |
| 170 void* operator new(size_t size) { return Heap::allocate<Node>(size); } | 172 void* operator new(size_t size) { return Heap::allocate<Node>(size); } |
| 171 #else // !ENABLE(OILPAN) | 173 #else // !ENABLE(OILPAN) |
| 172 // All Nodes are placed in their own heap partition for security. | 174 // All Nodes are placed in their own heap partition for security. |
| 173 // See http://crbug.com/246860 for detail. | 175 // See http://crbug.com/246860 for detail. |
| 174 void* operator new(size_t); | 176 void* operator new(size_t); |
| 175 void operator delete(void*); | 177 void operator delete(void*); |
| 176 #endif | 178 #endif |
| 177 | 179 |
| 178 static void dumpStatistics(); | 180 static void dumpStatistics(); |
| 179 | 181 |
| (...skipping 721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 901 } // namespace blink | 903 } // namespace blink |
| 902 | 904 |
| 903 #ifndef NDEBUG | 905 #ifndef NDEBUG |
| 904 // Outside the WebCore namespace for ease of invocation from gdb. | 906 // Outside the WebCore namespace for ease of invocation from gdb. |
| 905 void showNode(const blink::Node*); | 907 void showNode(const blink::Node*); |
| 906 void showTree(const blink::Node*); | 908 void showTree(const blink::Node*); |
| 907 void showNodePath(const blink::Node*); | 909 void showNodePath(const blink::Node*); |
| 908 #endif | 910 #endif |
| 909 | 911 |
| 910 #endif // Node_h | 912 #endif // Node_h |
| OLD | NEW |