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

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

Issue 280123002: Oilpan: move LiveNodeList collections to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Have NodeRareData clear out NodeListsNodeData instead. Created 6 years, 7 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/SelectorQuery.cpp ('k') | Source/core/dom/StaticNodeList.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/StaticNodeList.h
diff --git a/Source/core/dom/StaticNodeList.h b/Source/core/dom/StaticNodeList.h
index 1875132d4fdc6ffa053ad58d805986c3ceaca822..fad10f97586a1395ed4b124606e0a9bf5ef5433b 100644
--- a/Source/core/dom/StaticNodeList.h
+++ b/Source/core/dom/StaticNodeList.h
@@ -41,11 +41,11 @@ class Node;
class StaticNodeList FINAL : public NodeList {
public:
- static PassRefPtr<StaticNodeList> adopt(Vector<RefPtr<Node> >& nodes);
+ static PassRefPtrWillBeRawPtr<StaticNodeList> adopt(Vector<RefPtr<Node> >& nodes);
- static PassRefPtr<StaticNodeList> createEmpty()
+ static PassRefPtrWillBeRawPtr<StaticNodeList> createEmpty()
{
- return adoptRef(new StaticNodeList);
+ return adoptRefWillBeNoop(new StaticNodeList);
}
virtual ~StaticNodeList();
@@ -53,6 +53,8 @@ public:
virtual unsigned length() const OVERRIDE;
virtual Node* item(unsigned index) const OVERRIDE;
+ virtual void trace(Visitor*) OVERRIDE;
+
private:
// If AllocationSize() is larger than this, we report it as external
// allocated memory to V8.
@@ -60,10 +62,10 @@ private:
ptrdiff_t AllocationSize()
{
- return m_nodes.capacity() * sizeof(RefPtr<Node>);
+ return m_nodes.capacity() * sizeof(RefPtrWillBeMember<Node>);
}
- Vector<RefPtr<Node> > m_nodes;
+ WillBeHeapVector<RefPtrWillBeMember<Node> > m_nodes;
};
} // namespace WebCore
« no previous file with comments | « Source/core/dom/SelectorQuery.cpp ('k') | Source/core/dom/StaticNodeList.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698