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

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

Issue 170603003: Use nullptr_t for RefPtr, PassRefPtr and RawPtr. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Final rebase Created 6 years, 10 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/XPathEvaluator.cpp ('k') | Source/core/xml/XSLTProcessor.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/xml/XPathExpression.cpp
diff --git a/Source/core/xml/XPathExpression.cpp b/Source/core/xml/XPathExpression.cpp
index 2491cf380835e87206ec03c75743ef96caf8b5a9..a145c86d8b5fe17f94fe62140dd36fd0083b8cea 100644
--- a/Source/core/xml/XPathExpression.cpp
+++ b/Source/core/xml/XPathExpression.cpp
@@ -49,7 +49,7 @@ PassRefPtrWillBeRawPtr<XPathExpression> XPathExpression::createExpression(const
expr->m_topExpression = parser.parseStatement(expression, resolver, exceptionState);
if (!expr->m_topExpression)
- return 0;
+ return nullptr;
return expr.release();
}
@@ -63,12 +63,12 @@ PassRefPtrWillBeRawPtr<XPathResult> XPathExpression::evaluate(Node* contextNode,
{
if (!contextNode) {
exceptionState.throwDOMException(NotSupportedError, "The context node provided is null.");
- return 0;
+ return nullptr;
}
if (!isValidContextNode(contextNode)) {
exceptionState.throwDOMException(NotSupportedError, "The node provided is '" + contextNode->nodeName() + "', which is not a valid context node type.");
- return 0;
+ return nullptr;
}
EvaluationContext& evaluationContext = Expression::evaluationContext();
@@ -77,18 +77,18 @@ PassRefPtrWillBeRawPtr<XPathResult> XPathExpression::evaluate(Node* contextNode,
evaluationContext.position = 1;
evaluationContext.hadTypeConversionError = false;
RefPtrWillBeRawPtr<XPathResult> result = XPathResult::create(&contextNode->document(), m_topExpression->evaluate());
- evaluationContext.node = 0; // Do not hold a reference to the context node, as this may prevent the whole document from being destroyed in time.
+ evaluationContext.node = nullptr; // Do not hold a reference to the context node, as this may prevent the whole document from being destroyed in time.
if (evaluationContext.hadTypeConversionError) {
// It is not specified what to do if type conversion fails while evaluating an expression.
exceptionState.throwDOMException(SyntaxError, "Type conversion failed while evaluating the expression.");
- return 0;
+ return nullptr;
}
if (type != XPathResult::ANY_TYPE) {
result->convertTo(type, exceptionState);
if (exceptionState.hadException())
- return 0;
+ return nullptr;
}
return result;
« no previous file with comments | « Source/core/xml/XPathEvaluator.cpp ('k') | Source/core/xml/XSLTProcessor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698