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

Unified Diff: Source/core/dom/StaticNodeList.cpp

Issue 311053004: Report precise memory usage from StaticNodeList to v8 (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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/core/dom/StaticNodeList.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/StaticNodeList.cpp
diff --git a/Source/core/dom/StaticNodeList.cpp b/Source/core/dom/StaticNodeList.cpp
index f70db5e789d87ca864c3473e3cd5f6eebc2a3bc5..644f5cd88d6cac5479db9b7a8afde7c7788000e3 100644
--- a/Source/core/dom/StaticNodeList.cpp
+++ b/Source/core/dom/StaticNodeList.cpp
@@ -37,15 +37,13 @@ PassRefPtrWillBeRawPtr<StaticNodeList> StaticNodeList::adopt(WillBeHeapVector<Re
{
RefPtrWillBeRawPtr<StaticNodeList> nodeList = adoptRefWillBeNoop(new StaticNodeList);
nodeList->m_nodes.swap(nodes);
- if (nodeList->AllocationSize() > externalMemoryReportSizeLimit)
- v8::Isolate::GetCurrent()->AdjustAmountOfExternalAllocatedMemory(nodeList->AllocationSize());
+ v8::Isolate::GetCurrent()->AdjustAmountOfExternalAllocatedMemory(nodeList->AllocationSize());
return nodeList.release();
}
StaticNodeList::~StaticNodeList()
{
- if (AllocationSize() > externalMemoryReportSizeLimit)
- v8::Isolate::GetCurrent()->AdjustAmountOfExternalAllocatedMemory(-AllocationSize());
+ v8::Isolate::GetCurrent()->AdjustAmountOfExternalAllocatedMemory(-AllocationSize());
}
unsigned StaticNodeList::length() const
« no previous file with comments | « Source/core/dom/StaticNodeList.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698