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

Unified Diff: third_party/WebKit/Source/core/dom/StaticNodeList.h

Issue 1670463002: [Oilpan] Unify memory usage reporters of Oilpan (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Clean up Created 4 years, 10 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
Index: third_party/WebKit/Source/core/dom/StaticNodeList.h
diff --git a/third_party/WebKit/Source/core/dom/StaticNodeList.h b/third_party/WebKit/Source/core/dom/StaticNodeList.h
index a1bebef8ce823ce2461f7379320c41b7e52614a6..160eade9b2a29528a12106cad386238af29896ef 100644
--- a/third_party/WebKit/Source/core/dom/StaticNodeList.h
+++ b/third_party/WebKit/Source/core/dom/StaticNodeList.h
@@ -58,11 +58,6 @@ public:
DECLARE_VIRTUAL_TRACE();
private:
- ptrdiff_t AllocationSize()
- {
- return m_nodes.capacity() * sizeof(RefPtrWillBeMember<NodeType>);
- }
-
WillBeHeapVector<RefPtrWillBeMember<NodeType>> m_nodes;
};
@@ -74,14 +69,12 @@ PassRefPtrWillBeRawPtr<StaticNodeTypeList<NodeType>> StaticNodeTypeList<NodeType
{
RefPtrWillBeRawPtr<StaticNodeTypeList<NodeType>> nodeList = adoptRefWillBeNoop(new StaticNodeTypeList<NodeType>);
nodeList->m_nodes.swap(nodes);
- v8::Isolate::GetCurrent()->AdjustAmountOfExternalAllocatedMemory(nodeList->AllocationSize());
return nodeList.release();
}
template <typename NodeType>
StaticNodeTypeList<NodeType>::~StaticNodeTypeList()
{
- v8::Isolate::GetCurrent()->AdjustAmountOfExternalAllocatedMemory(-AllocationSize());
}
template <typename NodeType>

Powered by Google App Engine
This is Rietveld 408576698