summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Cargo.lock18
-rw-r--r--core/Cargo.toml3
-rw-r--r--core/icudtl.datbin0 -> 10413584 bytes
-rw-r--r--core/runtime.rs19
4 files changed, 27 insertions, 13 deletions
diff --git a/Cargo.lock b/Cargo.lock
index ed931e9cb..73899a0ca 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -26,6 +26,12 @@ dependencies = [
]
[[package]]
+name = "align-data"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1926655ba000b19e21f0402be09a1d52d318c8a8a68622870bfb7af2a71315cd"
+
+[[package]]
name = "alloc-no-stdlib"
version = "2.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -247,12 +253,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b700ce4376041dcd0a327fd0097c41095743c4c8af8887265942faf1100bd040"
[[package]]
-name = "cargo_gn"
-version = "0.0.15"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5ba7d7f7b201dfcbc314b14f2176c92f8ba521dab538b40e426ffed25ed7cd80"
-
-[[package]]
name = "cc"
version = "1.0.66"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -460,6 +460,7 @@ dependencies = [
name = "deno_core"
version = "0.79.0"
dependencies = [
+ "align-data",
"anyhow",
"futures",
"indexmap",
@@ -2145,12 +2146,11 @@ dependencies = [
[[package]]
name = "rusty_v8"
-version = "0.17.0"
+version = "0.19.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e4cacd73b88c22512f09c5ec78e56eb89d95e4dc1201fe52bd6c81824b5e041b"
+checksum = "a931537fc7d79e62dbb11457ca92b51a906089ece0aabc46e5387ddd9a20ac66"
dependencies = [
"bitflags",
- "cargo_gn",
"fslock",
"lazy_static",
"libc",
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
new file mode 100644
index 000000000..2f488bbb7
--- /dev/null
+++ b/core/icudtl.dat
Binary files differ
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(),