|
| 1 | +diff --git a/deps/v8/src/objects/js-temporal-zoneinfo64.cc b/deps/v8/src/objects/js-temporal-zoneinfo64.cc |
| 2 | +index 99dd3a84c1e..b6b399c10dc 100644 |
| 3 | +--- a/deps/v8/src/objects/js-temporal-zoneinfo64.cc |
| 4 | ++++ b/deps/v8/src/objects/js-temporal-zoneinfo64.cc |
| 5 | +@@ -11,12 +11,44 @@ |
| 6 | + #include "temporal_rs/TimeZone.hpp" |
| 7 | + |
| 8 | + #ifdef V8_INTL_SUPPORT |
| 9 | +-#include "udatamem.h" |
| 10 | ++#include "unicode/udata.h" |
| 11 | ++typedef struct { |
| 12 | ++ uint16_t headerSize; |
| 13 | ++ uint8_t magic1; |
| 14 | ++ uint8_t magic2; |
| 15 | ++} MappedData; |
| 16 | ++typedef struct { |
| 17 | ++ MappedData dataHeader; |
| 18 | ++ UDataInfo info; |
| 19 | ++} DataHeader; |
| 20 | ++typedef struct { |
| 21 | ++ void* Lookup; |
| 22 | ++ void* NumEntries; |
| 23 | ++} commonDataFuncs; |
| 24 | ++struct UDataMemory { |
| 25 | ++ const commonDataFuncs *vFuncs; /* Function Pointers for accessing TOC */ |
| 26 | ++ |
| 27 | ++ const DataHeader *pHeader; /* Header of the memory being described by this */ |
| 28 | ++ /* UDataMemory object. */ |
| 29 | ++ const void *toc; /* For common memory, table of contents for */ |
| 30 | ++ /* the pieces within. */ |
| 31 | ++ UBool heapAllocated; /* True if this UDataMemory Object is on the */ |
| 32 | ++ /* heap and thus needs to be deleted when closed. */ |
| 33 | ++ |
| 34 | ++ void *mapAddr; /* For mapped or allocated memory, the start addr. */ |
| 35 | ++ /* Only non-null if a close operation should unmap */ |
| 36 | ++ /* the associated data. */ |
| 37 | ++ void *map; /* Handle, or other data, OS dependent. */ |
| 38 | ++ /* Only non-null if a close operation should unmap */ |
| 39 | ++ /* the associated data, and additional info */ |
| 40 | ++ /* beyond the mapAddr is needed to do that. */ |
| 41 | ++ int32_t length; /* Length of the data in bytes; -1 if unknown. */ |
| 42 | ++}; |
| 43 | + #else |
| 44 | + // Defined in builtins-temporal-zoneinfo64-data.cc, generated by |
| 45 | + // include-file-as-bytes.py |
| 46 | +-extern "C" uint32_t zoneinfo64_static_data[]; |
| 47 | +-extern "C" size_t zoneinfo64_static_data_len; |
| 48 | ++static uint32_t zoneinfo64_static_data[] = {}; |
| 49 | ++static size_t zoneinfo64_static_data_len = 0; |
| 50 | + #endif |
| 51 | + |
| 52 | + namespace v8::internal { |
| 53 | +@@ -33,7 +65,7 @@ ZoneInfo64Provider::ZoneInfo64Provider() { |
| 54 | + // NOT udata_getLength: this ignores the header, |
| 55 | + // and we're parsing resb files with the header |
| 56 | + auto length = memory->length; |
| 57 | +- const void* data = udata_getRawMemory(memory); |
| 58 | ++ const void* data = udata_getMemory(memory); |
| 59 | + DCHECK_WITH_MSG(length % 4 == 0, "ICU4C should align udata to uint32_t"); |
| 60 | + if (length % 4 != 0) { |
| 61 | + // This really shouldn't happen: ICU4C aligns these files |
| 62 | +-- |
| 63 | +2.51.0 |
0 commit comments