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

Unified Diff: Source/core/xml/XPathParser.cpp

Issue 26709019: Vector stores Predicate object as OwnPtr instead of raw pointer in XPath. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 2 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/xml/XPathParser.h ('k') | Source/core/xml/XPathPath.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/xml/XPathParser.cpp
diff --git a/Source/core/xml/XPathParser.cpp b/Source/core/xml/XPathParser.cpp
index 332b8c3e730142ac889d41f8bfadfd9d3dfb297f..d7339afdc403a3c649ef798425194e860ddd3996 100644
--- a/Source/core/xml/XPathParser.cpp
+++ b/Source/core/xml/XPathParser.cpp
@@ -479,11 +479,9 @@ Expression* Parser::parseStatement(const String& statement, PassRefPtr<XPathNSRe
deleteAllValues(m_parseNodes);
m_parseNodes.clear();
- HashSet<Vector<Predicate*>*>::iterator pend = m_predicateVectors.end();
- for (HashSet<Vector<Predicate*>*>::iterator it = m_predicateVectors.begin(); it != pend; ++it) {
- deleteAllValues(**it);
+ HashSet<Vector<OwnPtr<Predicate> >*>::iterator pend = m_predicateVectors.end();
+ for (HashSet<Vector<OwnPtr<Predicate> >*>::iterator it = m_predicateVectors.begin(); it != pend; ++it)
delete *it;
- }
m_predicateVectors.clear();
HashSet<Vector<OwnPtr<Expression> >*>::iterator eend = m_expressionVectors.end();
@@ -540,7 +538,7 @@ void Parser::unregisterParseNode(ParseNode* node)
m_parseNodes.remove(node);
}
-void Parser::registerPredicateVector(Vector<Predicate*>* vector)
+void Parser::registerPredicateVector(Vector<OwnPtr<Predicate> >* vector)
{
if (vector == 0)
return;
@@ -550,7 +548,7 @@ void Parser::registerPredicateVector(Vector<Predicate*>* vector)
m_predicateVectors.add(vector);
}
-void Parser::deletePredicateVector(Vector<Predicate*>* vector)
+void Parser::deletePredicateVector(Vector<OwnPtr<Predicate> >* vector)
{
if (vector == 0)
return;
« no previous file with comments | « Source/core/xml/XPathParser.h ('k') | Source/core/xml/XPathPath.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698