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

Unified Diff: Source/core/xml/XPathGrammar.y

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 | « no previous file | Source/core/xml/XPathParser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/xml/XPathGrammar.y
diff --git a/Source/core/xml/XPathGrammar.y b/Source/core/xml/XPathGrammar.y
index e3c53d828972be0524ab4aea6e1e39f6c4e4fc21..6eba2252561610b31207a9b38b982a9e9d4fe81f 100644
--- a/Source/core/xml/XPathGrammar.y
+++ b/Source/core/xml/XPathGrammar.y
@@ -62,7 +62,7 @@ using namespace XPath;
EqTestOp::Opcode eqop;
String* str;
Expression* expr;
- Vector<Predicate*>* predList;
+ Vector<OwnPtr<Predicate> >* predList;
Vector<OwnPtr<Expression> >* argList;
Step* step;
LocationPath* locationPath;
@@ -291,15 +291,15 @@ OptionalPredicateList:
PredicateList:
Predicate
{
- $$ = new Vector<Predicate*>;
- $$->append(new Predicate(adoptPtr($1)));
+ $$ = new Vector<OwnPtr<Predicate> >;
+ $$->append(adoptPtr(new Predicate(adoptPtr($1))));
parser->unregisterParseNode($1);
parser->registerPredicateVector($$);
}
|
PredicateList Predicate
{
- $$->append(new Predicate(adoptPtr($2)));
+ $$->append(adoptPtr(new Predicate(adoptPtr($2))));
parser->unregisterParseNode($2);
}
;
« no previous file with comments | « no previous file | Source/core/xml/XPathParser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698