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

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

Issue 1099613003: Oilpan: have xml/ objects on the heap by default. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: simplify XPathResult dtor Created 5 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/XPathExpression.h ('k') | Source/core/xml/XPathExpression.idl » ('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 6025274a49f9705b905739f6cb9ed9bda3a4b70d..94f24a4bbbab0268362aba0279b5d2be42926965 100644
--- a/Source/core/xml/XPathExpression.cpp
+++ b/Source/core/xml/XPathExpression.cpp
@@ -40,22 +40,20 @@ namespace blink {
using namespace XPath;
-DEFINE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(XPathExpression);
-
XPathExpression::XPathExpression()
{
}
-PassRefPtrWillBeRawPtr<XPathExpression> XPathExpression::createExpression(const String& expression, PassRefPtrWillBeRawPtr<XPathNSResolver> resolver, ExceptionState& exceptionState)
+XPathExpression* XPathExpression::createExpression(const String& expression, XPathNSResolver* resolver, ExceptionState& exceptionState)
{
- RefPtrWillBeRawPtr<XPathExpression> expr = XPathExpression::create();
+ XPathExpression* expr = XPathExpression::create();
Parser parser;
expr->m_topExpression = parser.parseStatement(expression, resolver, exceptionState);
if (!expr->m_topExpression)
return nullptr;
- return expr.release();
+ return expr;
}
DEFINE_TRACE(XPathExpression)
@@ -63,7 +61,7 @@ DEFINE_TRACE(XPathExpression)
visitor->trace(m_topExpression);
}
-PassRefPtrWillBeRawPtr<XPathResult> XPathExpression::evaluate(Node* contextNode, unsigned short type, const ScriptValue&, ExceptionState& exceptionState)
+XPathResult* XPathExpression::evaluate(Node* contextNode, unsigned short type, const ScriptValue&, ExceptionState& exceptionState)
{
if (!isValidContextNode(contextNode)) {
exceptionState.throwDOMException(NotSupportedError, "The node provided is '" + contextNode->nodeName() + "', which is not a valid context node type.");
@@ -71,7 +69,7 @@ PassRefPtrWillBeRawPtr<XPathResult> XPathExpression::evaluate(Node* contextNode,
}
EvaluationContext evaluationContext(*contextNode);
- RefPtrWillBeRawPtr<XPathResult> result = XPathResult::create(evaluationContext, m_topExpression->evaluate(evaluationContext));
+ XPathResult* result = XPathResult::create(evaluationContext, m_topExpression->evaluate(evaluationContext));
if (evaluationContext.hadTypeConversionError) {
// It is not specified what to do if type conversion fails while evaluating an expression.
@@ -88,4 +86,4 @@ PassRefPtrWillBeRawPtr<XPathResult> XPathExpression::evaluate(Node* contextNode,
return result;
}
-}
+} // namespace blink
« no previous file with comments | « Source/core/xml/XPathExpression.h ('k') | Source/core/xml/XPathExpression.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698