Index: base/i18n/icu_util.cc |
diff --git a/base/i18n/icu_util.cc b/base/i18n/icu_util.cc |
index 8bbbc049e8ae2d3606d3781eef13d49e30b32ff1..76eaa62ff783ac8019cf41a4e8c0483950c14007 100644 |
--- a/base/i18n/icu_util.cc |
+++ b/base/i18n/icu_util.cc |
@@ -10,6 +10,7 @@ |
#include <string> |
+#include "base/debug/alias.h" |
#include "base/files/file_path.h" |
#include "base/files/memory_mapped_file.h" |
#include "base/logging.h" |
@@ -130,6 +131,10 @@ bool InitializeICU() { |
#if defined(OS_WIN) |
// The data file will be in the same directory as the current module. |
bool path_ok = PathService::Get(base::DIR_MODULE, &data_path); |
+ wchar_t tmp_buffer[_MAX_PATH] = {0}; |
+ wcscpy_s(tmp_buffer, data_path.value().c_str()); |
+ base::debug::Alias(tmp_buffer); |
+ CHECK(path_ok); // TODO(scottmg): http://crbug.com/445616 |
#elif defined(OS_ANDROID) |
bool path_ok = PathService::Get(base::DIR_ANDROID_APP_DATA, &data_path); |
#else |
@@ -140,6 +145,14 @@ bool InitializeICU() { |
#endif |
DCHECK(path_ok); |
data_path = data_path.AppendASCII(kIcuDataFileName); |
+ |
+#if defined(OS_WIN) |
+ // TODO(scottmg): http://crbug.com/445616 |
+ wchar_t tmp_buffer2[_MAX_PATH] = {0}; |
+ wcscpy_s(tmp_buffer2, data_path.value().c_str()); |
+ base::debug::Alias(tmp_buffer2); |
+#endif |
+ |
#else |
// Assume it is in the framework bundle's Resources directory. |
base::ScopedCFTypeRef<CFStringRef> data_file_name( |
@@ -152,12 +165,18 @@ bool InitializeICU() { |
} |
#endif // OS check |
if (!mapped_file.Initialize(data_path)) { |
+#if defined(OS_WIN) |
+ CHECK(false); // TODO(scottmg): http://crbug.com/445616 |
+#endif |
LOG(ERROR) << "Couldn't mmap " << data_path.AsUTF8Unsafe(); |
return false; |
} |
} |
UErrorCode err = U_ZERO_ERROR; |
udata_setCommonData(const_cast<uint8*>(mapped_file.data()), &err); |
+#if defined(OS_WIN) |
+ CHECK(err == U_ZERO_ERROR); // TODO(scottmg): http://crbug.com/445616 |
+#endif |
return err == U_ZERO_ERROR; |
#endif |
} |