| Index: Source/core/dom/Node.cpp
|
| diff --git a/Source/core/dom/Node.cpp b/Source/core/dom/Node.cpp
|
| index 25d4bfeddc71f5eb1f27bfa574eac9c872386a53..8c0cf09a819b53743334de10b852cd2a9e0433e4 100644
|
| --- a/Source/core/dom/Node.cpp
|
| +++ b/Source/core/dom/Node.cpp
|
| @@ -464,12 +464,13 @@ Node* Node::pseudoAwareLastChild() const
|
| return lastChild();
|
| }
|
|
|
| -void Node::insertBefore(PassRefPtrWillBeRawPtr<Node> newChild, Node* refChild, ExceptionState& exceptionState)
|
| +PassRefPtrWillBeRawPtr<Node> Node::insertBefore(PassRefPtrWillBeRawPtr<Node> newChild, Node* refChild, ExceptionState& exceptionState)
|
| {
|
| if (isContainerNode())
|
| - toContainerNode(this)->insertBefore(newChild, refChild, exceptionState);
|
| - else
|
| - exceptionState.throwDOMException(HierarchyRequestError, "This node type does not support this method.");
|
| + return toContainerNode(this)->insertBefore(newChild, refChild, exceptionState);
|
| +
|
| + exceptionState.throwDOMException(HierarchyRequestError, "This node type does not support this method.");
|
| + return nullptr;
|
| }
|
|
|
| void Node::replaceChild(PassRefPtrWillBeRawPtr<Node> newChild, Node* oldChild, ExceptionState& exceptionState)
|
| @@ -488,12 +489,13 @@ void Node::removeChild(Node* oldChild, ExceptionState& exceptionState)
|
| exceptionState.throwDOMException(NotFoundError, "This node type does not support this method.");
|
| }
|
|
|
| -void Node::appendChild(PassRefPtrWillBeRawPtr<Node> newChild, ExceptionState& exceptionState)
|
| +PassRefPtrWillBeRawPtr<Node> Node::appendChild(PassRefPtrWillBeRawPtr<Node> newChild, ExceptionState& exceptionState)
|
| {
|
| if (isContainerNode())
|
| - toContainerNode(this)->appendChild(newChild, exceptionState);
|
| - else
|
| - exceptionState.throwDOMException(HierarchyRequestError, "This node type does not support this method.");
|
| + return toContainerNode(this)->appendChild(newChild, exceptionState);
|
| +
|
| + exceptionState.throwDOMException(HierarchyRequestError, "This node type does not support this method.");
|
| + return nullptr;
|
| }
|
|
|
| void Node::remove(ExceptionState& exceptionState)
|
|
|