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); |