summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2021-07-02 09:32:48 +0200
committerGitHub <noreply@github.com>2021-07-02 09:32:48 +0200
commitbce662d5bb8c58fa4f2b6125c21a3453d7c898fb (patch)
tree7d80b2a5d9ae0b4e6a456b3584e141a01d05001a /core
parent0385a990529399775b76db4c27704faa4a092efa (diff)
chore: upgrade rusty_v8 and serde_v8 (#11216)
Diffstat (limited to 'core')
-rw-r--r--core/Cargo.toml4
-rw-r--r--core/runtime.rs9
2 files changed, 6 insertions, 7 deletions
diff --git a/core/Cargo.toml b/core/Cargo.toml
index 67b46d1a6..dd26cd2a6 100644
--- a/core/Cargo.toml
+++ b/core/Cargo.toml
@@ -20,10 +20,10 @@ lazy_static = "1.4.0"
libc = "0.2.93"
log = "0.4.14"
pin-project = "1.0.6"
-rusty_v8 = "0.23.0"
+rusty_v8 = "0.24.0"
serde = { version = "1.0.125", features = ["derive"] }
serde_json = { version = "1.0.64", features = ["preserve_order"] }
-serde_v8 = { version = "0.6.0" }
+serde_v8 = { version = "0.7.1" }
url = { version = "2.2.1", features = ["serde"] }
[[example]]
diff --git a/core/runtime.rs b/core/runtime.rs
index c414b307c..e734e0018 100644
--- a/core/runtime.rs
+++ b/core/runtime.rs
@@ -142,7 +142,7 @@ impl Drop for JsRuntime {
}
}
-fn v8_init(v8_platform: Option<v8::UniquePtr<v8::Platform>>) {
+fn v8_init(v8_platform: Option<v8::SharedRef<v8::Platform>>) {
// Include 10MB ICU data file.
#[repr(C, align(16))]
struct IcuData([u8; 10144432]);
@@ -150,8 +150,7 @@ fn v8_init(v8_platform: Option<v8::UniquePtr<v8::Platform>>) {
v8::icu::set_common_data_69(&ICU_DATA.0).unwrap();
let v8_platform = v8_platform
- .unwrap_or_else(v8::new_default_platform)
- .unwrap();
+ .unwrap_or_else(|| v8::new_default_platform(0, false).make_shared());
v8::V8::initialize_platform(v8_platform);
v8::V8::initialize();
@@ -205,7 +204,7 @@ pub struct RuntimeOptions {
/// V8 platform instance to use. Used when Deno initializes V8
/// (which it only does once), otherwise it's silenty dropped.
- pub v8_platform: Option<v8::UniquePtr<v8::Platform>>,
+ pub v8_platform: Option<v8::SharedRef<v8::Platform>>,
}
impl JsRuntime {
@@ -1973,7 +1972,7 @@ main();
#[test]
fn test_v8_platform() {
let options = RuntimeOptions {
- v8_platform: Some(v8::new_default_platform()),
+ v8_platform: Some(v8::new_default_platform(0, false).make_shared()),
..Default::default()
};
let mut runtime = JsRuntime::new(options);