| Index: ui/base/l10n/l10n_util.cc
|
| diff --git a/ui/base/l10n/l10n_util.cc b/ui/base/l10n/l10n_util.cc
|
| index 86b29802dbda5328321337f145d49d6deb44e8fb..0b7b9b7bcd3b2f2f7a4380f78dc0608d602af1f2 100644
|
| --- a/ui/base/l10n/l10n_util.cc
|
| +++ b/ui/base/l10n/l10n_util.cc
|
| @@ -246,6 +246,14 @@ bool IsLocaleAvailable(const std::string& locale) {
|
| if (!l10n_util::IsLocaleSupportedByOS(locale))
|
| return false;
|
|
|
| + // If the ResourceBundle is not yet initialized, return false to avoid the
|
| + // CHECK failure in ResourceBundle::GetSharedInstance().
|
| + if (!ResourceBundle::HasSharedInstance())
|
| + return false;
|
| +
|
| + // TODO(hshi): make ResourceBundle::LocaleDataPakExists() a static function
|
| + // so that this can be invoked without initializing the global instance.
|
| + // See crbug.com/230432: CHECK failure in GetUserDataDir().
|
| return ResourceBundle::GetSharedInstance().LocaleDataPakExists(locale);
|
| }
|
|
|
|
|