diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2021-03-12 23:55:32 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-12 23:55:32 +0100 |
commit | 10b99e8eb0e04e8340187b8aafe860405114d0d7 (patch) | |
tree | fcbadf5f7f89a230b25d817848caf1dbcbfe3eec /core/runtime.rs | |
parent | fbec6e39c7bc85a3f8a0d2a70192935be367e646 (diff) |
refactor: simplify icu data alignment (#9766)
Diffstat (limited to 'core/runtime.rs')
-rw-r--r-- | core/runtime.rs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/core/runtime.rs b/core/runtime.rs index f6d0ab5a6..c7a945717 100644 --- a/core/runtime.rs +++ b/core/runtime.rs @@ -200,12 +200,10 @@ impl JsRuntime { static DENO_INIT: Once = Once::new(); DENO_INIT.call_once(|| { // Include 10MB ICU data file. - assert!(v8::icu::set_common_data(align_data::include_aligned!( - align_data::Align16, - "icudtl.dat" - )) - .is_ok()); - + #[repr(C, align(16))] + struct ICUData([u8; 10413584]); + static ICU_DATA: ICUData = ICUData(*include_bytes!("icudtl.dat")); + v8::icu::set_common_data(&ICU_DATA.0).unwrap(); unsafe { v8_init() }; }); |