| Index: third_party/WebKit/Source/core/layout/ng/ng_bidi_paragraph.cc
|
| diff --git a/third_party/WebKit/Source/core/layout/ng/ng_bidi_paragraph.cc b/third_party/WebKit/Source/core/layout/ng/ng_bidi_paragraph.cc
|
| index 58337c5237454fa4b8c10b1667ef9119b3145e1b..48b234fadf809732a01dda1a10ee65b3e560ecd2 100644
|
| --- a/third_party/WebKit/Source/core/layout/ng/ng_bidi_paragraph.cc
|
| +++ b/third_party/WebKit/Source/core/layout/ng/ng_bidi_paragraph.cc
|
| @@ -5,6 +5,7 @@
|
| #include "core/layout/ng/ng_bidi_paragraph.h"
|
|
|
| #include "core/style/ComputedStyle.h"
|
| +#include "platform/text/ICUError.h"
|
|
|
| namespace blink {
|
|
|
| @@ -16,13 +17,19 @@ bool NGBidiParagraph::SetParagraph(const String& text,
|
| const ComputedStyle* block_style) {
|
| DCHECK(!ubidi_);
|
| ubidi_ = ubidi_open();
|
| - UErrorCode error = U_ZERO_ERROR;
|
| + ICUError error;
|
| ubidi_setPara(ubidi_, text.characters16(), text.length(),
|
| block_style->unicodeBidi() == Plaintext
|
| ? UBIDI_DEFAULT_LTR
|
| : (block_style->direction() == RTL ? UBIDI_RTL : UBIDI_LTR),
|
| nullptr, &error);
|
| - return U_SUCCESS(error);
|
| + if (U_FAILURE(error)) {
|
| + NOTREACHED();
|
| + ubidi_close(ubidi_);
|
| + ubidi_ = nullptr;
|
| + return false;
|
| + }
|
| + return true;
|
| }
|
|
|
| unsigned NGBidiParagraph::GetLogicalRun(unsigned start,
|
|
|