From bce662d5bb8c58fa4f2b6125c21a3453d7c898fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Fri, 2 Jul 2021 09:32:48 +0200 Subject: chore: upgrade rusty_v8 and serde_v8 (#11216) --- core/runtime.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'core/runtime.rs') 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>) { +fn v8_init(v8_platform: Option>) { // Include 10MB ICU data file. #[repr(C, align(16))] struct IcuData([u8; 10144432]); @@ -150,8 +150,7 @@ fn v8_init(v8_platform: Option>) { 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>, + pub v8_platform: Option>, } 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); -- cgit v1.2.3