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

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

Issue 23890025: WIP (Introduce WTF::NonNullPtr<T>.) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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/testing/Internals.cpp ('k') | Source/wtf/Forward.h » ('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 94ddadda8838143f9ae8758e3619df71032c7985..b9147455b85857fd741bbb32437e2af9133825be 100644
--- a/Source/core/xml/XPathFunctions.cpp
+++ b/Source/core/xml/XPathFunctions.cpp
@@ -330,7 +330,7 @@ Value FunId::evaluate() const
idList.append(str);
}
- TreeScope& contextScope = evaluationContext().node->treeScope();
+ NonNullPtr<TreeScope> contextScope = evaluationContext().node->treeScope();
NodeSet result;
HashSet<Node*> resultSet;
@@ -349,7 +349,7 @@ Value FunId::evaluate() const
// If there are several nodes with the same id, id() should return the first one.
// In WebKit, getElementById behaves so, too, although its behavior in this case is formally undefined.
- Node* node = contextScope.getElementById(idList.substring(startPos, endPos - startPos));
+ Node* node = contextScope->getElementById(idList.substring(startPos, endPos - startPos));
if (node && resultSet.add(node).isNewEntry)
result.append(node);
« no previous file with comments | « Source/core/testing/Internals.cpp ('k') | Source/wtf/Forward.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698