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

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

Issue 301743006: Report DOM partitionAlloc size to V8 GC. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: force 1024 dromaeo.com/222494 Created 6 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 | « Source/bindings/v8/V8GCController.cpp ('k') | Source/platform/Partitions.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, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 using namespace std; 100 using namespace std;
101 101
102 namespace WebCore { 102 namespace WebCore {
103 103
104 using namespace HTMLNames; 104 using namespace HTMLNames;
105 105
106 #if !ENABLE(OILPAN) 106 #if !ENABLE(OILPAN)
107 void* Node::operator new(size_t size) 107 void* Node::operator new(size_t size)
108 { 108 {
109 ASSERT(isMainThread()); 109 ASSERT(isMainThread());
110 return partitionAlloc(Partitions::getObjectModelPartition(), size); 110 void* ptr = partitionAlloc(Partitions::getObjectModelPartition(), size);
111 Partitions::addDOMMemoryUsage(1024);//partitionAllocGetSize(ptr));
esprehn 2014/06/05 01:04:26 This still seems wrong, why aren't you just report
112 return ptr;
111 } 113 }
112 114
113 void Node::operator delete(void* ptr) 115 void Node::operator delete(void* ptr)
114 { 116 {
115 ASSERT(isMainThread()); 117 ASSERT(isMainThread());
118 Partitions::subtractDOMMemoryUsage(1024);//partitionAllocGetSize(ptr));
116 partitionFree(ptr); 119 partitionFree(ptr);
117 } 120 }
118 #endif 121 #endif
119 122
120 #if DUMP_NODE_STATISTICS 123 #if DUMP_NODE_STATISTICS
121 static HashSet<Node*>& liveNodeSet() 124 static HashSet<Node*>& liveNodeSet()
122 { 125 {
123 DEFINE_STATIC_LOCAL(HashSet<Node*>, s_liveNodeSet, ()); 126 DEFINE_STATIC_LOCAL(HashSet<Node*>, s_liveNodeSet, ());
124 return s_liveNodeSet; 127 return s_liveNodeSet;
125 } 128 }
(...skipping 2470 matching lines...) Expand 10 before | Expand all | Expand 10 after
2596 node->showTreeForThis(); 2599 node->showTreeForThis();
2597 } 2600 }
2598 2601
2599 void showNodePath(const WebCore::Node* node) 2602 void showNodePath(const WebCore::Node* node)
2600 { 2603 {
2601 if (node) 2604 if (node)
2602 node->showNodePathForThis(); 2605 node->showNodePathForThis();
2603 } 2606 }
2604 2607
2605 #endif 2608 #endif
OLDNEW
« no previous file with comments | « Source/bindings/v8/V8GCController.cpp ('k') | Source/platform/Partitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698