| Index: Source/core/xml/XPathResult.cpp
|
| diff --git a/Source/core/xml/XPathResult.cpp b/Source/core/xml/XPathResult.cpp
|
| index 613a3ed2b76f0df1d93d9a8279768608a91d425b..ad6a5cf3e80349cd8bd6a0a51f6d1af7e2c59869 100644
|
| --- a/Source/core/xml/XPathResult.cpp
|
| +++ b/Source/core/xml/XPathResult.cpp
|
| @@ -155,7 +155,7 @@ Node* XPathResult::singleNodeValue(ExceptionState& exceptionState) const
|
| {
|
| if (resultType() != ANY_UNORDERED_NODE_TYPE && resultType() != FIRST_ORDERED_NODE_TYPE) {
|
| exceptionState.throwTypeError("The result type is not a single node.");
|
| - return 0;
|
| + return nullptr;
|
| }
|
|
|
| const NodeSet& nodes = m_value.toNodeSet(0);
|
| @@ -187,16 +187,16 @@ Node* XPathResult::iterateNext(ExceptionState& exceptionState)
|
| {
|
| if (resultType() != UNORDERED_NODE_ITERATOR_TYPE && resultType() != ORDERED_NODE_ITERATOR_TYPE) {
|
| exceptionState.throwTypeError("The result type is not an iterator.");
|
| - return 0;
|
| + return nullptr;
|
| }
|
|
|
| if (invalidIteratorState()) {
|
| exceptionState.throwDOMException(InvalidStateError, "The document has mutated since the result was returned.");
|
| - return 0;
|
| + return nullptr;
|
| }
|
|
|
| if (m_nodeSetPosition + 1 > nodeSet().size())
|
| - return 0;
|
| + return nullptr;
|
|
|
| Node* node = nodeSet()[m_nodeSetPosition];
|
|
|
| @@ -209,12 +209,12 @@ Node* XPathResult::snapshotItem(unsigned index, ExceptionState& exceptionState)
|
| {
|
| if (resultType() != UNORDERED_NODE_SNAPSHOT_TYPE && resultType() != ORDERED_NODE_SNAPSHOT_TYPE) {
|
| exceptionState.throwTypeError("The result type is not a snapshot.");
|
| - return 0;
|
| + return nullptr;
|
| }
|
|
|
| const NodeSet& nodes = m_value.toNodeSet(0);
|
| if (index >= nodes.size())
|
| - return 0;
|
| + return nullptr;
|
|
|
| return nodes[index];
|
| }
|
|
|