Index: Source/core/dom/Range.cpp |
diff --git a/Source/core/dom/Range.cpp b/Source/core/dom/Range.cpp |
index 667caf6034b6ee254d7c57530f09995b3af638fa..389e65fe038dece09c4b53ac597acf1d78a52b7d 100644 |
--- a/Source/core/dom/Range.cpp |
+++ b/Source/core/dom/Range.cpp |
@@ -157,7 +157,8 @@ static inline bool checkForDifferentRootContainer(const RangeBoundaryPoint& star |
void Range::setStart(PassRefPtrWillBeRawPtr<Node> refNode, int offset, ExceptionState& exceptionState) |
{ |
if (!refNode) { |
- exceptionState.throwDOMException(NotFoundError, "The node provided was null."); |
+ // FIXME: Generated bindings code never calls with null, and neither should other callers! |
+ exceptionState.throwTypeError("The node provided is null."); |
return; |
} |
@@ -180,7 +181,8 @@ void Range::setStart(PassRefPtrWillBeRawPtr<Node> refNode, int offset, Exception |
void Range::setEnd(PassRefPtrWillBeRawPtr<Node> refNode, int offset, ExceptionState& exceptionState) |
{ |
if (!refNode) { |
- exceptionState.throwDOMException(NotFoundError, "The node provided was null."); |
+ // FIXME: Generated bindings code never calls with null, and neither should other callers! |
+ exceptionState.throwTypeError("The node provided is null."); |
return; |
} |
@@ -223,7 +225,8 @@ void Range::collapse(bool toStart) |
bool Range::isPointInRange(Node* refNode, int offset, ExceptionState& exceptionState) |
{ |
if (!refNode) { |
- exceptionState.throwDOMException(HierarchyRequestError, "The node provided was null."); |
+ // FIXME: Generated bindings code never calls with null, and neither should other callers! |
+ exceptionState.throwTypeError("The node provided is null."); |
return false; |
} |
@@ -281,7 +284,8 @@ Range::CompareResults Range::compareNode(Node* refNode, ExceptionState& exceptio |
// before and after(surrounds), or inside the range, respectively |
if (!refNode) { |
- exceptionState.throwDOMException(NotFoundError, "The node provided was null."); |
+ // FIXME: Generated bindings code never calls with null, and neither should other callers! |
+ exceptionState.throwTypeError("The node provided is null."); |
return NODE_BEFORE; |
} |
@@ -473,7 +477,8 @@ void Range::deleteContents(ExceptionState& exceptionState) |
static bool nodeValidForIntersects(Node* refNode, Document* expectedDocument, ExceptionState& exceptionState) |
{ |
if (!refNode) { |
- exceptionState.throwDOMException(NotFoundError, "The node provided is null."); |
+ // FIXME: Generated bindings code never calls with null, and neither should other callers! |
+ exceptionState.throwTypeError("The node provided is null."); |
return false; |
} |
@@ -860,7 +865,8 @@ void Range::insertNode(PassRefPtrWillBeRawPtr<Node> prpNewNode, ExceptionState& |
RefPtrWillBeRawPtr<Node> newNode = prpNewNode; |
if (!newNode) { |
- exceptionState.throwDOMException(NotFoundError, "The node provided is null."); |
+ // FIXME: Generated bindings code never calls with null, and neither should other callers! |
+ exceptionState.throwTypeError("The node provided is null."); |
return; |
} |
@@ -1079,7 +1085,8 @@ Node* Range::checkNodeWOffset(Node* n, int offset, ExceptionState& exceptionStat |
void Range::checkNodeBA(Node* n, ExceptionState& exceptionState) const |
{ |
if (!n) { |
- exceptionState.throwDOMException(NotFoundError, "The node provided is null."); |
+ // FIXME: Generated bindings code never calls with null, and neither should other callers! |
+ exceptionState.throwTypeError("The node provided is null."); |
return; |
} |
@@ -1162,7 +1169,8 @@ void Range::setEndAfter(Node* refNode, ExceptionState& exceptionState) |
void Range::selectNode(Node* refNode, ExceptionState& exceptionState) |
{ |
if (!refNode) { |
- exceptionState.throwDOMException(NotFoundError, "The node provided is null."); |
+ // FIXME: Generated bindings code never calls with null, and neither should other callers! |
+ exceptionState.throwTypeError("The node provided is null."); |
return; |
} |
@@ -1216,7 +1224,8 @@ void Range::selectNode(Node* refNode, ExceptionState& exceptionState) |
void Range::selectNodeContents(Node* refNode, ExceptionState& exceptionState) |
{ |
if (!refNode) { |
- exceptionState.throwDOMException(NotFoundError, "The node provided is null."); |
+ // FIXME: Generated bindings code never calls with null, and neither should other callers! |
+ exceptionState.throwTypeError("The node provided is null."); |
return; |
} |
@@ -1281,7 +1290,8 @@ void Range::surroundContents(PassRefPtrWillBeRawPtr<Node> passNewParent, Excepti |
{ |
RefPtrWillBeRawPtr<Node> newParent = passNewParent; |
if (!newParent) { |
- exceptionState.throwDOMException(NotFoundError, "The node provided is null."); |
+ // FIXME: Generated bindings code never calls with null, and neither should other callers! |
+ exceptionState.throwTypeError("The node provided is null."); |
return; |
} |