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

Unified Diff: Source/core/xml/XPathFunctions.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/XPathFunctions.h ('k') | Source/core/xml/XPathGrammar.y » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/xml/XPathFunctions.cpp
diff --git a/Source/core/xml/XPathFunctions.cpp b/Source/core/xml/XPathFunctions.cpp
index 1ab1aad1778daf273c4dd2997f09b489f7d2e9ce..aeea79c90ee9c6910df67019c06632aeb23a91af 100644
--- a/Source/core/xml/XPathFunctions.cpp
+++ b/Source/core/xml/XPathFunctions.cpp
@@ -291,7 +291,7 @@ inline bool Interval::contains(int value) const
return value >= m_min && value <= m_max;
}
-void Function::setArguments(WillBeHeapVector<OwnPtrWillBeMember<Expression>>& args)
+void Function::setArguments(HeapVector<Member<Expression>>& args)
{
ASSERT(!subExprCount());
@@ -299,9 +299,8 @@ void Function::setArguments(WillBeHeapVector<OwnPtrWillBeMember<Expression>>& ar
if (m_name != "lang" && !args.isEmpty())
setIsContextNodeSensitive(false);
- WillBeHeapVector<OwnPtrWillBeMember<Expression>>::iterator end = args.end();
- for (WillBeHeapVector<OwnPtrWillBeMember<Expression>>::iterator it = args.begin(); it != end; ++it)
- addSubExpression(it->release());
+ for (Expression* arg : args)
+ addSubExpression(arg);
}
Value FunLast::evaluate(EvaluationContext& context) const
@@ -332,7 +331,7 @@ Value FunId::evaluate(EvaluationContext& context) const
}
TreeScope& contextScope = context.node->treeScope();
- OwnPtrWillBeRawPtr<NodeSet> result(NodeSet::create());
+ NodeSet* result(NodeSet::create());
WillBeHeapHashSet<RawPtrWillBeMember<Node>> resultSet;
unsigned startPos = 0;
@@ -359,7 +358,7 @@ Value FunId::evaluate(EvaluationContext& context) const
result->markSorted(false);
- return Value(result.release(), Value::adopt);
+ return Value(result, Value::adopt);
}
static inline String expandedNameLocalPart(Node* node)
@@ -727,11 +726,11 @@ static void createFunctionMap()
Function* createFunction(const String& name)
{
- WillBeHeapVector<OwnPtrWillBeMember<Expression>> args;
+ HeapVector<Member<Expression>> args;
return createFunction(name, args);
}
-Function* createFunction(const String& name, WillBeHeapVector<OwnPtrWillBeMember<Expression>>& args)
+Function* createFunction(const String& name, HeapVector<Member<Expression>>& args)
{
if (!functionMap)
createFunctionMap();
« no previous file with comments | « Source/core/xml/XPathFunctions.h ('k') | Source/core/xml/XPathGrammar.y » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698