Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrade: rusty_v8 0.19.0 #9466

Merged
merged 11 commits into from
Feb 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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