Commit 9d45b49c authored by Yang Guo's avatar Yang Guo Committed by Commit Bot

[icu] remove ICU_DATA_SHARED option

R=jshin@chromium.org

Bug: chromium:938223
Change-Id: I0dca3f79f9466c559e1ad61b1f327428ee63732a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1513615
Auto-Submit: Yang Guo <yangguo@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60201}
parent f6acafd7
......@@ -20,7 +20,7 @@ deps = {
'v8/third_party/depot_tools':
Var('chromium_url') + '/chromium/tools/depot_tools.git' + '@' + '77e5d48a085ee4fe7f6e10f5dcbb12fbc59eb4d2',
'v8/third_party/icu':
Var('chromium_url') + '/chromium/deps/icu.git' + '@' + '8c67416ccb4da42d817e7081ff83a2193b1aabe7',
Var('chromium_url') + '/chromium/deps/icu.git' + '@' + '2fd941df00511f26554ab37ae0d00cdc26361d0b',
'v8/third_party/instrumented_libraries':
Var('chromium_url') + '/chromium/src/third_party/instrumented_libraries.git' + '@' + 'a959e4f0cb643003f2d75d179cede449979e3e77',
'v8/buildtools':
......
......@@ -19,11 +19,8 @@
#include "src/base/file-utils.h"
#define ICU_UTIL_DATA_FILE 0
#define ICU_UTIL_DATA_SHARED 1
#define ICU_UTIL_DATA_STATIC 2
#define ICU_UTIL_DATA_STATIC 1
#define ICU_UTIL_DATA_SYMBOL "icudt" U_ICU_VERSION_SHORT "_dat"
#define ICU_UTIL_DATA_SHARED_MODULE_NAME "icudt.dll"
#endif
namespace v8 {
......@@ -71,21 +68,8 @@ bool InitializeICU(const char* icu_data_file) {
#if !defined(V8_INTL_SUPPORT)
return true;
#else
#if ICU_UTIL_DATA_IMPL == ICU_UTIL_DATA_SHARED
// We expect to find the ICU data module alongside the current module.
HMODULE module = LoadLibraryA(ICU_UTIL_DATA_SHARED_MODULE_NAME);
if (!module) return false;
FARPROC addr = GetProcAddress(module, ICU_UTIL_DATA_SYMBOL);
if (!addr) return false;
UErrorCode err = U_ZERO_ERROR;
udata_setCommonData(reinterpret_cast<void*>(addr), &err);
// Never try to load ICU data from files.
udata_setFileAccess(UDATA_ONLY_PACKAGES, &err);
return err == U_ZERO_ERROR;
#elif ICU_UTIL_DATA_IMPL == ICU_UTIL_DATA_STATIC
// Mac/Linux bundle the ICU data in.
#if ICU_UTIL_DATA_IMPL == ICU_UTIL_DATA_STATIC
// Use bundled ICU data.
return true;
#elif ICU_UTIL_DATA_IMPL == ICU_UTIL_DATA_FILE
if (!icu_data_file) return false;
......@@ -119,5 +103,8 @@ bool InitializeICU(const char* icu_data_file) {
#endif
}
#undef ICU_UTIL_DATA_FILE
#undef ICU_UTIL_DATA_STATIC
} // namespace internal
} // namespace v8
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