Skip to content

Commit

Permalink
upgrade: rusty_v8 0.19.0 (#9466)
Browse files Browse the repository at this point in the history
Co-authored-by: Ryan Dahl <ry@tinyclouds.org>
  • Loading branch information
bartlomieju and ry authored Feb 15, 2021
1 parent 8c6d147 commit 0cf952e
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 13 deletions.
18 changes: 9 additions & 9 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@ 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"
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"
Expand Down
Binary file added core/icudtl.dat
Binary file not shown.
19 changes: 16 additions & 3 deletions core/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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() };
});

Expand Down Expand Up @@ -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(),
Expand Down

0 comments on commit 0cf952e

Please sign in to comment.