Commit b34a7d23 authored by jochen's avatar jochen Committed by Commit bot

Crash with an error message when ICU data files are missing

Before, we'd just crash.

BUG=v8:3348
R=svenpanne@chromium.org
LOG=n

Review URL: https://codereview.chromium.org/807313003

Cr-Commit-Position: refs/heads/master@{#25877}
parent 73b4c2b7
......@@ -704,6 +704,10 @@ icu::SimpleDateFormat* DateFormat::InitializeDateTimeFormat(
icu::Locale no_extension_locale(icu_locale.getBaseName());
date_format = CreateICUDateFormat(isolate, no_extension_locale, options);
if (!date_format) {
FATAL("Failed to create ICU date format, are ICU data files missing?");
}
// Set resolved settings (pattern, numbering system, calendar).
SetResolvedDateSettings(
isolate, no_extension_locale, date_format, resolved);
......@@ -780,6 +784,10 @@ icu::DecimalFormat* NumberFormat::InitializeNumberFormat(
number_format = CreateICUNumberFormat(
isolate, no_extension_locale, options);
if (!number_format) {
FATAL("Failed to create ICU number format, are ICU data files missing?");
}
// Set resolved settings (pattern, numbering system).
SetResolvedNumberSettings(
isolate, no_extension_locale, number_format, resolved);
......@@ -839,6 +847,10 @@ icu::Collator* Collator::InitializeCollator(
icu::Locale no_extension_locale(icu_locale.getBaseName());
collator = CreateICUCollator(isolate, no_extension_locale, options);
if (!collator) {
FATAL("Failed to create ICU collator, are ICU data files missing?");
}
// Set resolved settings (pattern, numbering system).
SetResolvedCollatorSettings(
isolate, no_extension_locale, collator, resolved);
......@@ -898,6 +910,10 @@ icu::BreakIterator* BreakIterator::InitializeBreakIterator(
break_iterator = CreateICUBreakIterator(
isolate, no_extension_locale, options);
if (!break_iterator) {
FATAL("Failed to create ICU break iterator, are ICU data files missing?");
}
// Set resolved settings (locale).
SetResolvedBreakIteratorSettings(
isolate, no_extension_locale, break_iterator, resolved);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment