diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/Cargo.toml | 3 | ||||
-rw-r--r-- | core/icudtl.dat | bin | 0 -> 10413584 bytes | |||
-rw-r--r-- | core/runtime.rs | 19 |
3 files changed, 18 insertions, 4 deletions
diff --git a/core/Cargo.toml b/core/Cargo.toml index 2a74f0ad8..775b37126 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -13,6 +13,7 @@ repository = "https://github.com/denoland/deno" path = "lib.rs" [dependencies] +align-data = "0.1" anyhow = "1.0.38" futures = "0.3.12" indexmap = "1.6.1" @@ -20,7 +21,7 @@ lazy_static = "1.4.0" libc = "0.2.86" log = "0.4.14" pin-project = "1.0.5" -rusty_v8 = "0.17.0" +rusty_v8 = "0.19.0" serde = { version = "1.0.123", features = ["derive"] } serde_json = { version = "1.0.62", features = ["preserve_order"] } smallvec = "1.6.1" diff --git a/core/icudtl.dat b/core/icudtl.dat Binary files differnew file mode 100644 index 000000000..2f488bbb7 --- /dev/null +++ b/core/icudtl.dat diff --git a/core/runtime.rs b/core/runtime.rs index 1b67550b7..05d76b4d5 100644 --- a/core/runtime.rs +++ b/core/runtime.rs @@ -201,6 +201,13 @@ impl JsRuntime { pub fn new(mut options: RuntimeOptions) -> Self { 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()); + unsafe { v8_init() }; }); @@ -693,9 +700,15 @@ impl JsRuntime { let module = maybe_module.unwrap(); let mut import_specifiers: Vec<ModuleSpecifier> = vec![]; - for i in 0..module.get_module_requests_length() { - let import_specifier = - module.get_module_request(i).to_rust_string_lossy(tc_scope); + let module_requests = module.get_module_requests(); + for i in 0..module_requests.length() { + let module_request = v8::Local::<v8::ModuleRequest>::try_from( + module_requests.get(tc_scope, i).unwrap(), + ) + .unwrap(); + let import_specifier = module_request + .get_specifier() + .to_rust_string_lossy(tc_scope); let state = state_rc.borrow(); let module_specifier = state.loader.resolve( state.op_state.clone(), |