Index: third_party/WebKit/Source/core/editing/VisibleUnits.cpp |
diff --git a/third_party/WebKit/Source/core/editing/VisibleUnits.cpp b/third_party/WebKit/Source/core/editing/VisibleUnits.cpp |
index d5e2463f6bc0514c384c714ae2689d8ed1eaef36..83d953f8274ba2b5e381c061523ff4190257fd90 100644 |
--- a/third_party/WebKit/Source/core/editing/VisibleUnits.cpp |
+++ b/third_party/WebKit/Source/core/editing/VisibleUnits.cpp |
@@ -2984,8 +2984,7 @@ static VisiblePositionTemplate<Strategy> skipToEndOfEditingBoundary(const Visibl |
template <typename Strategy> |
static UChar32 characterAfterAlgorithm(const VisiblePositionTemplate<Strategy>& visiblePosition) |
{ |
- // TODO(xiaochengh): Ensure that this function is called with a valid |
- // |visiblePosition|, and add |DCHECK(visiblePosition.isValid())| |
+ DCHECK(visiblePosition.isValid()) << visiblePosition; |
// We canonicalize to the first of two equivalent candidates, but the second |
// of the two candidates is the one that will be inside the text node |
// containing the character after this visible position. |
@@ -3017,8 +3016,7 @@ UChar32 characterAfter(const VisiblePositionInFlatTree& visiblePosition) |
template <typename Strategy> |
static UChar32 characterBeforeAlgorithm(const VisiblePositionTemplate<Strategy>& visiblePosition) |
yosin_UTC9
2016/09/27 08:30:53
Not sure how about making |characterAfter()| to ta
Xiaocheng
2016/09/27 08:48:51
Talked offline. A lot of functions in VisibleUnits
|
{ |
- // TODO(xiaochengh): Ensure that this function is called with a valid |
- // |visiblePosition|, and add |DCHECK(visiblePosition.isValid())| |
+ DCHECK(visiblePosition.isValid()) << visiblePosition; |
return characterAfter(previousPositionOf(visiblePosition)); |
} |