Index: Source/core/dom/Node.cpp |
diff --git a/Source/core/dom/Node.cpp b/Source/core/dom/Node.cpp |
index 25d4bfeddc71f5eb1f27bfa574eac9c872386a53..ce104a589d24aec107a7f20a578c5ba5cb2ab644 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) |