Chromium Code Reviews| Index: Source/core/xml/XPathExpressionNode.h |
| diff --git a/Source/core/xml/XPathExpressionNode.h b/Source/core/xml/XPathExpressionNode.h |
| index 7101a562edf1e10f677cd4e7c4886c182f671c2a..572352a120838ec4157c5f93e8b835d3b4660033 100644 |
| --- a/Source/core/xml/XPathExpressionNode.h |
| +++ b/Source/core/xml/XPathExpressionNode.h |
| @@ -65,7 +65,7 @@ namespace WebCore { |
| void addSubExpression(Expression* expr) |
|
abarth-chromium
2013/10/11 20:28:05
This should be a PassOwnPtr<Expression>
|
| { |
| - m_subExpressions.append(expr); |
| + m_subExpressions.append(adoptPtr(expr)); |
|
abarth-chromium
2013/10/11 20:28:05
We should call adoptPtr immediately after calling
dshwang
2013/10/11 20:43:35
I hope so but this method is used by yacc.c
If it
|
| m_isContextNodeSensitive |= expr->m_isContextNodeSensitive; |
| m_isContextPositionSensitive |= expr->m_isContextPositionSensitive; |
| m_isContextSizeSensitive |= expr->m_isContextSizeSensitive; |
| @@ -82,11 +82,11 @@ namespace WebCore { |
| protected: |
| unsigned subExprCount() const { return m_subExpressions.size(); } |
| - Expression* subExpr(unsigned i) { return m_subExpressions[i]; } |
| - const Expression* subExpr(unsigned i) const { return m_subExpressions[i]; } |
| + Expression* subExpr(unsigned i) { return m_subExpressions[i].get(); } |
| + const Expression* subExpr(unsigned i) const { return m_subExpressions[i].get(); } |
| private: |
| - Vector<Expression*> m_subExpressions; |
| + Vector<OwnPtr<Expression> > m_subExpressions; |
| // Evaluation details that can be used for optimization. |
| bool m_isContextNodeSensitive; |