Chromium Code Reviews| Index: Source/core/dom/Range.cpp |
| diff --git a/Source/core/dom/Range.cpp b/Source/core/dom/Range.cpp |
| index 4bc3f5f8cbceff87ce8e2b33f29a03eea3d37a0a..6148783c0cf1dcd3dccd15a1ffd5830a5c7d0a34 100644 |
| --- a/Source/core/dom/Range.cpp |
| +++ b/Source/core/dom/Range.cpp |
| @@ -321,10 +321,10 @@ Range::CompareResults Range::compareNode(Node* refNode, ExceptionState& exceptio |
| return NODE_INSIDE; // ends inside the range |
| } |
| -short Range::compareBoundaryPoints(CompareHow how, const Range* sourceRange, ExceptionState& exceptionState) const |
| +short Range::compareBoundaryPoints(CompareHow how, const PassRefPtrWillBeRawPtr<Range> sourceRange, ExceptionState& exceptionState) const |
| { |
| - if (!sourceRange) { |
| - exceptionState.throwDOMException(NotFoundError, "The source range provided was null."); |
| + if (how < START_TO_START || how > END_TO_START) { |
|
haraken
2014/07/21 14:09:38
I'd prefer:
if (!(how == START_TO_START || how
kangil_
2014/07/22 00:27:01
Done.
|
| + exceptionState.throwDOMException(NotSupportedError, "The comparison method provided must be one of 'START_TO_START', 'START_TO_END', 'END_TO_END', or 'END_TO_START'."); |
| return 0; |
| } |
| @@ -357,7 +357,7 @@ short Range::compareBoundaryPoints(CompareHow how, const Range* sourceRange, Exc |
| return compareBoundaryPoints(m_start, sourceRange->m_end, exceptionState); |
| } |
| - exceptionState.throwDOMException(SyntaxError, "The comparison method provided must be one of 'START_TO_START', 'START_TO_END', 'END_TO_END', or 'END_TO_START'."); |
| + ASSERT_NOT_REACHED(); |
| return 0; |
| } |