| Index: third_party/WebKit/Source/core/layout/line/InlineTextBox.cpp
|
| diff --git a/third_party/WebKit/Source/core/layout/line/InlineTextBox.cpp b/third_party/WebKit/Source/core/layout/line/InlineTextBox.cpp
|
| index 4de3f2b63023260a6f399e8c966b70934080ebdd..239118a9de3dfe8bd8683c6309517dd5c04896b9 100644
|
| --- a/third_party/WebKit/Source/core/layout/line/InlineTextBox.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/line/InlineTextBox.cpp
|
| @@ -616,6 +616,10 @@ TextRun InlineTextBox::constructTextRun(
|
| String string = getLineLayoutItem().text();
|
| unsigned startPos = start();
|
| unsigned length = len();
|
| + // Ensure |this| is in sync with the corresponding LayoutText. Checking here
|
| + // has less binary size/perf impact than in StringView().
|
| + RELEASE_ASSERT(startPos <= string.length() &&
|
| + length <= string.length() - startPos);
|
| return constructTextRun(style, StringView(string, startPos, length),
|
| getLineLayoutItem().textLength() - startPos,
|
| charactersWithHyphen);
|
|
|