| Index: third_party/WebKit/Source/core/layout/svg/SVGTextMetricsBuilder.cpp
|
| diff --git a/third_party/WebKit/Source/core/layout/svg/SVGTextMetricsBuilder.cpp b/third_party/WebKit/Source/core/layout/svg/SVGTextMetricsBuilder.cpp
|
| index caabcbf1dfb00edb44535cf4e28a59edd3427c5d..1da27a460e421a1b887bbb2f80b4fb79477a185c 100644
|
| --- a/third_party/WebKit/Source/core/layout/svg/SVGTextMetricsBuilder.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/svg/SVGTextMetricsBuilder.cpp
|
| @@ -162,6 +162,12 @@ unsigned SVGTextMetricsCalculator::updateSubrunRangesForCurrentPosition()
|
| }
|
| }
|
|
|
| + // TODO(pdr): m_subrunRanges can be too short in the presence of invalid
|
| + // unicode characters (see: crbug.com/595960). This is a temporary
|
| + // workaround to ensure the returned index is valid for m_subrunRages.
|
| + if (positionInRun >= m_subrunRanges.size())
|
| + return 0;
|
| +
|
| return positionInRun;
|
| }
|
|
|
|
|