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

Unified Diff: source/common/utext.cpp

Issue 1621843002: ICU 56 update step 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/icu.git@561
Patch Set: Created 4 years, 11 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « source/common/ustrenum.cpp ('k') | source/common/uts46.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/common/utext.cpp
diff --git a/source/common/utext.cpp b/source/common/utext.cpp
index 6dc31a0485d70e89e753f217137dddc4cacd1578..d2f37baf9580fa9299005bfd1b2db795f3e3de67 100644
--- a/source/common/utext.cpp
+++ b/source/common/utext.cpp
@@ -1,7 +1,7 @@
/*
*******************************************************************************
*
-* Copyright (C) 2005-2014, International Business Machines
+* Copyright (C) 2005-2015, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
@@ -2028,6 +2028,9 @@ utext_openReplaceable(UText *ut, Replaceable *rep, UErrorCode *status)
return NULL;
}
ut = utext_setup(ut, sizeof(ReplExtra), status);
+ if(U_FAILURE(*status)) {
+ return ut;
+ }
ut->providerProperties = I32_FLAG(UTEXT_PROVIDER_WRITABLE);
if(rep->hasMetaData()) {
@@ -2733,6 +2736,9 @@ charIterTextClone(UText *dest, const UText *src, UBool deep, UErrorCode * status
CharacterIterator *srcCI =(CharacterIterator *)src->context;
srcCI = srcCI->clone();
dest = utext_openCharacterIterator(dest, srcCI, status);
+ if (U_FAILURE(*status)) {
+ return dest;
+ }
// cast off const on getNativeIndex.
// For CharacterIterator based UTexts, this is safe, the operation is const.
int64_t ix = utext_getNativeIndex((UText *)src);
« no previous file with comments | « source/common/ustrenum.cpp ('k') | source/common/uts46.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698