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

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: Fix nits 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/CollectionItemsCache.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..83d8ba439032cd60ddc726cc90de570cb0bba397 100644
--- a/third_party/WebKit/Source/core/dom/StaticNodeList.h
+++ b/third_party/WebKit/Source/core/dom/StaticNodeList.h
@@ -33,7 +33,6 @@
#include "wtf/PassRefPtr.h"
#include "wtf/RefPtr.h"
#include "wtf/Vector.h"
-#include <v8.h>
namespace blink {
@@ -58,11 +57,6 @@ public:
DECLARE_VIRTUAL_TRACE();
private:
- ptrdiff_t AllocationSize()
- {
- return m_nodes.capacity() * sizeof(RefPtrWillBeMember<NodeType>);
- }
-
WillBeHeapVector<RefPtrWillBeMember<NodeType>> m_nodes;
};
@@ -74,14 +68,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>
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/CollectionItemsCache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698