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

Unified Diff: third_party/WebKit/Source/core/xml/XPathNodeSet.h

Issue 2560823003: Avoid WTF::Vector::at() and operator[] in core/xml. (Closed)
Patch Set: Created 4 years 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/xml/XPathNodeSet.h
diff --git a/third_party/WebKit/Source/core/xml/XPathNodeSet.h b/third_party/WebKit/Source/core/xml/XPathNodeSet.h
index 00549aeadca676850200d339fcb821ef9724b264..6ba8ee1ac0e1f97aba9ce0ebd0e16d6c8a4b9d60 100644
--- a/third_party/WebKit/Source/core/xml/XPathNodeSet.h
+++ b/third_party/WebKit/Source/core/xml/XPathNodeSet.h
@@ -43,6 +43,12 @@ class NodeSet final : public GarbageCollected<NodeSet> {
size_t size() const { return m_nodes.size(); }
bool isEmpty() const { return !m_nodes.size(); }
Node* operator[](unsigned i) const { return m_nodes.at(i).get(); }
+ HeapVector<Member<Node>>::iterator begin() { return m_nodes.begin(); }
+ HeapVector<Member<Node>>::iterator end() { return m_nodes.end(); }
+ HeapVector<Member<Node>>::const_iterator begin() const {
+ return m_nodes.begin();
+ }
+ HeapVector<Member<Node>>::const_iterator end() const { return m_nodes.end(); }
void reserveCapacity(size_t newCapacity) {
m_nodes.reserveCapacity(newCapacity);
}
« no previous file with comments | « third_party/WebKit/Source/core/xml/XPathFunctions.cpp ('k') | third_party/WebKit/Source/core/xml/XPathParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698