Index: third_party/WebKit/Source/core/editing/iterators/TextIterator.cpp |
diff --git a/third_party/WebKit/Source/core/editing/iterators/TextIterator.cpp b/third_party/WebKit/Source/core/editing/iterators/TextIterator.cpp |
index 2368499c400e69dd5e1be50b64b2d69bc7656057..28e9ffe76f23ff2fe7e28ffe87a9972c74081b0c 100644 |
--- a/third_party/WebKit/Source/core/editing/iterators/TextIterator.cpp |
+++ b/third_party/WebKit/Source/core/editing/iterators/TextIterator.cpp |
@@ -170,13 +170,9 @@ TextIteratorAlgorithm<Strategy>::TextIteratorAlgorithm( |
DCHECK(!start.GetDocument()->View() || |
!start.GetDocument()->View()->NeedsLayout()); |
DCHECK(!start.GetDocument()->NeedsLayoutTreeUpdate()); |
- |
- if (start.CompareTo(end) > 0) { |
- Initialize(end.ComputeContainerNode(), end.ComputeOffsetInContainerNode(), |
- start.ComputeContainerNode(), |
- start.ComputeOffsetInContainerNode()); |
- return; |
- } |
+ // To avoid renderer hang, we use |CHECK_LE()| to catch the bad callers |
+ // in release build. |
+ CHECK_LE(start, end); |
Initialize(start.ComputeContainerNode(), start.ComputeOffsetInContainerNode(), |
end.ComputeContainerNode(), end.ComputeOffsetInContainerNode()); |
} |