Speculative fix and test for crash
Add a check to SetICUDefault() and fall back to en-US when an incoming locale id fails to create a valid icu::locale instance. Roll ICU to b971435d43 to pick up an upstream fix. icu::Locale::setDefault() can fail when an invalid/too long locale id is passed. It appears that this might happen when the locale id comes from GetOverrideLocale() on iOS. A test added is similar to what the upstream added in the upstream fix ( http://bugs.icu-project.org/trac/changeset/40267 ) which was cherry-picked in https://chromium-review.googlesource.com/c/574935/ . BUG=chromium:734093 TEST=base_unittests --gtest_filter=SetICU* Change-Id: If8d3522b23a257466ca3c31b66089cb415fec3a2 Reviewed-on: https://chromium-review.googlesource.com/574936Reviewed-by:Avi Drissman <avi@chromium.org> Commit-Queue: Jungshik Shin <jshin@chromium.org> Cr-Commit-Position: refs/heads/master@{#487533}
Showing
Please register or sign in to comment