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

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

Issue 252633005: Enable WTF::HashSet<OwnPtr<> > (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Met comments from Erik Corry Created 6 years, 8 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/wtf/HashFunctions.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 ed50edb494cda6b96cc45ea613c9c00b0217e3be..cff87bf31d8f685f7104d67301e50c72cbbad697 100644
--- a/Source/core/xml/XPathParser.cpp
+++ b/Source/core/xml/XPathParser.cpp
@@ -488,10 +488,8 @@ Expression* Parser::parseStatement(const String& statement, PassRefPtrWillBeRawP
delete *it;
m_expressionVectors.clear();
- deleteAllValues(m_strings);
m_strings.clear();
- deleteAllValues(m_nodeTests);
m_nodeTests.clear();
m_topExpr = 0;
@@ -587,7 +585,7 @@ void Parser::registerString(String* s)
ASSERT(!m_strings.contains(s));
- m_strings.add(s);
+ m_strings.add(adoptPtr(s));
}
void Parser::deleteString(String* s)
@@ -598,7 +596,6 @@ void Parser::deleteString(String* s)
ASSERT(m_strings.contains(s));
m_strings.remove(s);
- delete s;
}
void Parser::registerNodeTest(Step::NodeTest* t)
@@ -608,7 +605,7 @@ void Parser::registerNodeTest(Step::NodeTest* t)
ASSERT(!m_nodeTests.contains(t));
- m_nodeTests.add(t);
+ m_nodeTests.add(adoptPtr(t));
}
void Parser::deleteNodeTest(Step::NodeTest* t)
@@ -619,6 +616,5 @@ void Parser::deleteNodeTest(Step::NodeTest* t)
ASSERT(m_nodeTests.contains(t));
m_nodeTests.remove(t);
- delete t;
}
« no previous file with comments | « Source/core/xml/XPathParser.h ('k') | Source/wtf/HashFunctions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698