| Index: Source/core/dom/Node.cpp
|
| diff --git a/Source/core/dom/Node.cpp b/Source/core/dom/Node.cpp
|
| index 8af4165eb24a4b736848148c34141be39e915632..b1c3ea7eedd4aed7a462f78b0b11324cacd95fed 100644
|
| --- a/Source/core/dom/Node.cpp
|
| +++ b/Source/core/dom/Node.cpp
|
| @@ -479,20 +479,22 @@ PassRefPtrWillBeRawPtr<Node> Node::insertBefore(PassRefPtrWillBeRawPtr<Node> new
|
| return nullptr;
|
| }
|
|
|
| -void Node::replaceChild(PassRefPtrWillBeRawPtr<Node> newChild, Node* oldChild, ExceptionState& exceptionState)
|
| +PassRefPtrWillBeRawPtr<Node> Node::replaceChild(PassRefPtrWillBeRawPtr<Node> newChild, PassRefPtrWillBeRawPtr<Node> oldChild, ExceptionState& exceptionState)
|
| {
|
| if (isContainerNode())
|
| - toContainerNode(this)->replaceChild(newChild, oldChild, exceptionState);
|
| - else
|
| - exceptionState.throwDOMException(HierarchyRequestError, "This node type does not support this method.");
|
| + return toContainerNode(this)->replaceChild(newChild, oldChild, exceptionState);
|
| +
|
| + exceptionState.throwDOMException(HierarchyRequestError, "This node type does not support this method.");
|
| + return nullptr;
|
| }
|
|
|
| -void Node::removeChild(Node* oldChild, ExceptionState& exceptionState)
|
| +PassRefPtrWillBeRawPtr<Node> Node::removeChild(PassRefPtrWillBeRawPtr<Node> oldChild, ExceptionState& exceptionState)
|
| {
|
| if (isContainerNode())
|
| - toContainerNode(this)->removeChild(oldChild, exceptionState);
|
| - else
|
| - exceptionState.throwDOMException(NotFoundError, "This node type does not support this method.");
|
| + return toContainerNode(this)->removeChild(oldChild, exceptionState);
|
| +
|
| + exceptionState.throwDOMException(NotFoundError, "This node type does not support this method.");
|
| + return nullptr;
|
| }
|
|
|
| PassRefPtrWillBeRawPtr<Node> Node::appendChild(PassRefPtrWillBeRawPtr<Node> newChild, ExceptionState& exceptionState)
|
|
|