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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/bindings/v8/V8GCController.cpp ('k') | Source/platform/Partitions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Node.cpp
diff --git a/Source/core/dom/Node.cpp b/Source/core/dom/Node.cpp
index f81607e3888e9cbc4097c45d2a157aa6a0920ec6..6c823ce22dfd206f4b11c44fb7d4b8e69b0db54a 100644
--- a/Source/core/dom/Node.cpp
+++ b/Source/core/dom/Node.cpp
@@ -107,12 +107,15 @@ using namespace HTMLNames;
void* Node::operator new(size_t size)
{
ASSERT(isMainThread());
- return partitionAlloc(Partitions::getObjectModelPartition(), size);
+ void* ptr = partitionAlloc(Partitions::getObjectModelPartition(), size);
+ Partitions::addDOMMemoryUsage(1024);//partitionAllocGetSize(ptr));
esprehn 2014/06/05 01:04:26 This still seems wrong, why aren't you just report
+ return ptr;
}
void Node::operator delete(void* ptr)
{
ASSERT(isMainThread());
+ Partitions::subtractDOMMemoryUsage(1024);//partitionAllocGetSize(ptr));
partitionFree(ptr);
}
#endif
« 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