Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(481)

Issue 2527183002: Add ICUError to handle ICU failures (Closed)

Created:
4 years ago by kojii
Modified:
4 years ago
CC:
atotic+reviews_chromium.org, blink-reviews, blink-reviews-layout_chromium.org, cbiesinger, chromium-reviews, eae+blinkwatch, glebl+reviews_chromium.org, jchaffraix+rendering, leviw+renderwatch, ojan+watch_chromium.org, pdr+renderingwatchlist_chromium.org, szager+layoutwatch_chromium.org, zoltan1
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add ICUError to handle ICU failures ICU reports its memory allocation failure through UErrorCode, while Blink would like to crash the renderer using OOM_CRASH()[1]. ICUError provides the unified way to handle ICU errors in Blink. In this CL, all failures lead to the render crash, just differently by the error type. We may add lighter methods, such as to crash only if critical, or to ignore certain types, if needed in future. [1] https://groups.google.com/a/chromium.org/d/msg/platform-architecture-dev/MP0k9WGnCjA/zIBiJtilBwAJ Committed: https://crrev.com/9a878afefb2ffcad5f064b8715e3bf625e77c4e5 Cr-Commit-Position: refs/heads/master@{#434662}

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : Made conservative #

Patch Set 4 : Destructor calls crashIfCritical #

Patch Set 5 : eae review, add invalid argument error #

Unified diffs Side-by-side diffs Delta from patch set Stats (+80 lines, -3 lines) Patch
M third_party/WebKit/Source/core/layout/ng/ng_bidi_paragraph.cc View 1 2 3 2 chunks +9 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_inline_node.cc View 1 2 3 4 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/BUILD.gn View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/platform/text/ICUError.h View 1 2 3 4 1 chunk +41 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/platform/text/ICUError.cpp View 1 2 3 4 1 chunk +28 lines, -0 lines 0 comments Download

Messages

Total messages: 36 (27 generated)
kojii
WDYT? ikilpatrik@ asked me what we should do when ubidi_setPara failed in the past review, ...
4 years ago (2016-11-24 14:25:19 UTC) #10
eae
Crashing on any ICU error seems a little extreme, in most cases we can probably ...
4 years ago (2016-11-24 21:52:13 UTC) #13
kojii
Yeah, I was wondering the same thing...maybe we go through error codes and pick up ...
4 years ago (2016-11-25 02:57:15 UTC) #14
kojii
errors are: http://icu-project.org/apiref/icu4c/utypes_8h.html#a3343c1c8a8377277046774691c98d78c and below the U_ZERO_ERROR are errors. Values above U_ZERO_ERROR are U_SUCCESS().
4 years ago (2016-11-25 02:59:11 UTC) #15
eae
For memory allocation and invalid argument errors I'd argue crashing is the appropriate way to ...
4 years ago (2016-11-25 16:43:13 UTC) #24
kojii
Thank you, added invalid argument error as critical.
4 years ago (2016-11-28 16:18:55 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2527183002/80001
4 years ago (2016-11-28 16:19:19 UTC) #32
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years ago (2016-11-28 16:22:38 UTC) #34
commit-bot: I haz the power
4 years ago (2016-11-28 16:24:41 UTC) #36
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/9a878afefb2ffcad5f064b8715e3bf625e77c4e5
Cr-Commit-Position: refs/heads/master@{#434662}

Powered by Google App Engine
This is Rietveld 408576698