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

Side by Side Diff: third_party/WebKit/Source/platform/text/ICUError.cpp

Issue 2527183002: Add ICUError to handle ICU failures (Closed)
Patch Set: eae review, add invalid argument error Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/platform/text/ICUError.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "platform/text/ICUError.h"
6
7 namespace blink {
8
9 // Distinguish memory allocation failures from other errors.
10 // https://groups.google.com/a/chromium.org/d/msg/platform-architecture-dev/MP0k 9WGnCjA/zIBiJtilBwAJ
11 static NEVER_INLINE void ICUOutOfMemory() {
12 OOM_CRASH();
13 }
14
15 void ICUError::handleFailure() {
16 switch (m_error) {
17 case U_MEMORY_ALLOCATION_ERROR:
18 ICUOutOfMemory();
19 break;
20 case U_ILLEGAL_ARGUMENT_ERROR:
21 CHECK(false) << m_error;
22 break;
23 default:
24 break;
25 }
26 }
27
28 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/text/ICUError.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698