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

Unified Diff: Source/core/xml/XPathPredicate.h

Issue 26763004: Vector stores Expression object as OwnPtr instead of raw pointer in XPath. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Change XPathGrammar.y also 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
Index: Source/core/xml/XPathPredicate.h
diff --git a/Source/core/xml/XPathPredicate.h b/Source/core/xml/XPathPredicate.h
index 93eaad737be6935679303337e22a29135105dddb..0b506f2f9b0eca27038cc0db75bcf6f96725ada1 100644
--- a/Source/core/xml/XPathPredicate.h
+++ b/Source/core/xml/XPathPredicate.h
@@ -65,7 +65,7 @@ namespace WebCore {
enum Opcode {
OP_Add, OP_Sub, OP_Mul, OP_Div, OP_Mod
};
- NumericOp(Opcode, Expression* lhs, Expression* rhs);
+ NumericOp(Opcode, PassOwnPtr<Expression> lhs, PassOwnPtr<Expression> rhs);
private:
virtual Value evaluate() const;
virtual Value::Type resultType() const { return Value::NumberValue; }
@@ -76,7 +76,7 @@ namespace WebCore {
class EqTestOp : public Expression {
public:
enum Opcode { OP_EQ, OP_NE, OP_GT, OP_LT, OP_GE, OP_LE };
- EqTestOp(Opcode, Expression* lhs, Expression* rhs);
+ EqTestOp(Opcode, PassOwnPtr<Expression> lhs, PassOwnPtr<Expression> rhs);
virtual Value evaluate() const;
private:
virtual Value::Type resultType() const { return Value::BooleanValue; }
@@ -88,7 +88,7 @@ namespace WebCore {
class LogicalOp : public Expression {
public:
enum Opcode { OP_And, OP_Or };
- LogicalOp(Opcode, Expression* lhs, Expression* rhs);
+ LogicalOp(Opcode, PassOwnPtr<Expression> lhs, PassOwnPtr<Expression> rhs);
private:
virtual Value::Type resultType() const { return Value::BooleanValue; }
bool shortCircuitOn() const;
@@ -106,7 +106,7 @@ namespace WebCore {
class Predicate {
WTF_MAKE_NONCOPYABLE(Predicate); WTF_MAKE_FAST_ALLOCATED;
public:
- explicit Predicate(Expression*);
+ explicit Predicate(PassOwnPtr<Expression>);
~Predicate();
bool evaluate() const;
@@ -114,7 +114,7 @@ namespace WebCore {
bool isContextSizeSensitive() const { return m_expr->isContextSizeSensitive(); }
private:
- Expression* m_expr;
+ OwnPtr<Expression> m_expr;
};
}

Powered by Google App Engine
This is Rietveld 408576698