diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2021-02-15 17:32:08 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-15 17:32:08 +0100 |
commit | 0cf952e7fbcabb90b0b9999eabd12d22a458f933 (patch) | |
tree | 1e03c51ab453ef108f0f53024081cc3942657c4a /core/runtime.rs | |
parent | 8c6d147e6ae40a1f92aba1aedc0d95ef437dd4ba (diff) |
upgrade: rusty_v8 0.19.0 (#9466)
Co-authored-by: Ryan Dahl <ry@tinyclouds.org>
Diffstat (limited to 'core/runtime.rs')
-rw-r--r-- | core/runtime.rs | 19 |
1 files changed, 16 insertions, 3 deletions
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(), |