From 0cf952e7fbcabb90b0b9999eabd12d22a458f933 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Mon, 15 Feb 2021 17:32:08 +0100 Subject: upgrade: rusty_v8 0.19.0 (#9466) Co-authored-by: Ryan Dahl --- core/runtime.rs | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'core/runtime.rs') 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 = 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::::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(), -- cgit v1.2.3