2021-06-19 20:11:46 +02:00
|
|
|
diff --git a/core/runtime.rs.1 b/core/runtime.rs
|
|
|
|
index 71aad8e..a806ecd 100644
|
2021-07-04 08:16:26 +02:00
|
|
|
@@ -140,16 +140,15 @@ 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.
|
2021-06-19 20:11:46 +02:00
|
|
|
#[repr(C, align(16))]
|
2021-07-04 08:16:26 +02:00
|
|
|
- struct IcuData([u8; 10413584]);
|
|
|
|
+ struct IcuData([u8; 10144432]);
|
2021-06-19 20:11:46 +02:00
|
|
|
static ICU_DATA: IcuData = IcuData(*include_bytes!("icudtl.dat"));
|
|
|
|
- v8::icu::set_common_data(&ICU_DATA.0).unwrap();
|
|
|
|
+ v8::icu::set_common_data_69(&ICU_DATA.0).unwrap();
|
|
|
|
|
|
|
|
let v8_platform = v8_platform
|
2021-07-04 08:16:26 +02:00
|
|
|
- .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();
|
|
|
|
|
|
|
|
@@ -159,9 +158,10 @@ fn v8_init(v8_platform: Option<v8::UniquePtr<v8::Platform>>) {
|
|
|
|
// PumpMessageLoop and RunMicrotasks setup correctly.
|
|
|
|
// See https://github.com/denoland/deno/issues/2544
|
|
|
|
" --experimental-wasm-threads",
|
|
|
|
- " --no-wasm-async-compilation",
|
|
|
|
+ " --wasm-test-streaming",
|
|
|
|
" --harmony-import-assertions",
|
|
|
|
" --no-validate-asm",
|
|
|
|
+ " --sparkplug",
|
|
|
|
);
|
|
|
|
v8::V8::set_flags_from_string(flags);
|
|
|
|
}
|
|
|
|
@@ -203,7 +203,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>>,
|
|
|
|
|
|
|
|
/// Create a V8 inspector and attach to the runtime.
|
|
|
|
pub attach_inspector: bool,
|
|
|
|
@@ -1966,7 +1966,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);
|