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

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

Issue 1721333002: Bug fix: Add BlinkGC allocation hooks to CSS, Node and vector/table backing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Hook in allocateOnHeapIndex Created 4 years, 9 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
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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 const char* typeName = WTF_HEAP_PROFILER_TYPE_NAME(Node);
Primiano Tucci (use gerrit) 2016/02/29 17:23:14 ditto here
hajimehoshi 2016/03/03 10:12:31 Done.
188 return Heap::allocateOnHeapIndex(state, size, isEager ? BlinkGC::EagerSw eepHeapIndex : BlinkGC::NodeHeapIndex, GCInfoTrait<EventTarget>::index(), typeNa me);
188 } 189 }
189 #else // !ENABLE(OILPAN) 190 #else // !ENABLE(OILPAN)
190 // All Nodes are placed in their own heap partition for security. 191 // All Nodes are placed in their own heap partition for security.
191 // See http://crbug.com/246860 for detail. 192 // See http://crbug.com/246860 for detail.
192 void* operator new(size_t); 193 void* operator new(size_t);
193 void operator delete(void*); 194 void operator delete(void*);
194 #endif 195 #endif
195 196
196 static void dumpStatistics(); 197 static void dumpStatistics();
197 198
(...skipping 732 matching lines...) Expand 10 before | Expand all | Expand 10 after
930 } // namespace blink 931 } // namespace blink
931 932
932 #ifndef NDEBUG 933 #ifndef NDEBUG
933 // Outside the WebCore namespace for ease of invocation from gdb. 934 // Outside the WebCore namespace for ease of invocation from gdb.
934 void showNode(const blink::Node*); 935 void showNode(const blink::Node*);
935 void showTree(const blink::Node*); 936 void showTree(const blink::Node*);
936 void showNodePath(const blink::Node*); 937 void showNodePath(const blink::Node*);
937 #endif 938 #endif
938 939
939 #endif // Node_h 940 #endif // Node_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698