deno/deno-69.patch

54 lines
1.9 KiB
Diff
Raw Normal View History

diff --git a/core/runtime.rs.1 b/core/runtime.rs
index 71aad8e..a806ecd 100644
@@ -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.
#[repr(C, align(16))]
- struct IcuData([u8; 10413584]);
+ struct IcuData([u8; 10144432]);
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
- .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);