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

Side by Side Diff: Source/core/dom/Node.h

Issue 1157933002: Oilpan: introduce eager finalization. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Parameterize Heap::poisonHeap() over ObjectsToPoison Created 5 years, 6 months 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/core/events/EventTarget.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 DOCUMENT_POSITION_CONTAINED_BY = 0x10, 163 DOCUMENT_POSITION_CONTAINED_BY = 0x10,
164 DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 0x20, 164 DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 0x20,
165 }; 165 };
166 166
167 #if ENABLE(OILPAN) 167 #if ENABLE(OILPAN)
168 // Override operator new to allocate Node subtype objects onto 168 // Override operator new to allocate Node subtype objects onto
169 // a dedicated heap. 169 // a dedicated heap.
170 GC_PLUGIN_IGNORE("crbug.com/443854") 170 GC_PLUGIN_IGNORE("crbug.com/443854")
171 void* operator new(size_t size) 171 void* operator new(size_t size)
172 { 172 {
173 return allocateObject(size); 173 return allocateObject(size, false);
174 } 174 }
175 static void* allocateObject(size_t size) 175 static void* allocateObject(size_t size, bool isEager)
176 { 176 {
177 ThreadState* state = ThreadStateFor<ThreadingTrait<Node>::Affinity>::sta te(); 177 ThreadState* state = ThreadStateFor<ThreadingTrait<Node>::Affinity>::sta te();
178 return Heap::allocateOnHeapIndex(state, size, NodeHeapIndex, GCInfoTrait <EventTarget>::index()); 178 return Heap::allocateOnHeapIndex(state, size, isEager ? EagerSweepHeapIn dex : NodeHeapIndex, GCInfoTrait<EventTarget>::index());
179 } 179 }
180 #else // !ENABLE(OILPAN) 180 #else // !ENABLE(OILPAN)
181 // All Nodes are placed in their own heap partition for security. 181 // All Nodes are placed in their own heap partition for security.
182 // See http://crbug.com/246860 for detail. 182 // See http://crbug.com/246860 for detail.
183 void* operator new(size_t); 183 void* operator new(size_t);
184 void operator delete(void*); 184 void operator delete(void*);
185 #endif 185 #endif
186 186
187 static void dumpStatistics(); 187 static void dumpStatistics();
188 188
(...skipping 728 matching lines...) Expand 10 before | Expand all | Expand 10 after
917 } // namespace blink 917 } // namespace blink
918 918
919 #ifndef NDEBUG 919 #ifndef NDEBUG
920 // Outside the WebCore namespace for ease of invocation from gdb. 920 // Outside the WebCore namespace for ease of invocation from gdb.
921 void showNode(const blink::Node*); 921 void showNode(const blink::Node*);
922 void showTree(const blink::Node*); 922 void showTree(const blink::Node*);
923 void showNodePath(const blink::Node*); 923 void showNodePath(const blink::Node*);
924 #endif 924 #endif
925 925
926 #endif // Node_h 926 #endif // Node_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/events/EventTarget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698