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

Unified Diff: Source/core/dom/NamedNodeMap.cpp

Issue 170603003: Use nullptr_t for RefPtr, PassRefPtr and RawPtr. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Final rebase Created 6 years, 10 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/dom/MutationObserverRegistration.cpp ('k') | Source/core/dom/NodeIterator.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/NamedNodeMap.cpp
diff --git a/Source/core/dom/NamedNodeMap.cpp b/Source/core/dom/NamedNodeMap.cpp
index 499f7b65e7dd9e82a224a66a89c9ad1897307d5d..f0627cfa7f34e6df1d13dba38aa80bdf4359a48e 100644
--- a/Source/core/dom/NamedNodeMap.cpp
+++ b/Source/core/dom/NamedNodeMap.cpp
@@ -60,7 +60,7 @@ PassRefPtr<Node> NamedNodeMap::removeNamedItem(const AtomicString& name, Excepti
size_t index = m_element->hasAttributes() ? m_element->getAttributeItemIndex(name, m_element->shouldIgnoreAttributeCase()) : kNotFound;
if (index == kNotFound) {
exceptionState.throwDOMException(NotFoundError, "No item with name '" + name + "' was found.");
- return 0;
+ return nullptr;
}
return m_element->detachAttribute(index);
}
@@ -70,7 +70,7 @@ PassRefPtr<Node> NamedNodeMap::removeNamedItemNS(const AtomicString& namespaceUR
size_t index = m_element->hasAttributes() ? m_element->getAttributeItemIndex(QualifiedName(nullAtom, localName, namespaceURI)) : kNotFound;
if (index == kNotFound) {
exceptionState.throwDOMException(NotFoundError, "No item with name '" + namespaceURI + "::" + localName + "' was found.");
- return 0;
+ return nullptr;
}
return m_element->detachAttribute(index);
}
@@ -79,13 +79,13 @@ PassRefPtr<Node> NamedNodeMap::setNamedItem(Node* node, ExceptionState& exceptio
{
if (!node) {
exceptionState.throwDOMException(NotFoundError, "The node provided was null.");
- return 0;
+ return nullptr;
}
// Not mentioned in spec: throw a HIERARCHY_REQUEST_ERROR if the user passes in a non-attribute node
if (!node->isAttributeNode()) {
exceptionState.throwDOMException(HierarchyRequestError, "The node provided is not an attribute node.");
- return 0;
+ return nullptr;
}
return m_element->setAttributeNode(toAttr(node), exceptionState);
@@ -99,7 +99,7 @@ PassRefPtr<Node> NamedNodeMap::setNamedItemNS(Node* node, ExceptionState& except
PassRefPtr<Node> NamedNodeMap::item(unsigned index) const
{
if (index >= length())
- return 0;
+ return nullptr;
return m_element->ensureAttr(m_element->attributeItem(index)->name());
}
« no previous file with comments | « Source/core/dom/MutationObserverRegistration.cpp ('k') | Source/core/dom/NodeIterator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698