mirror of
https://github.com/denoland/deno.git
synced 2024-11-22 04:51:22 +00:00
chore: update rusty_v8 to 0.41.0 (#13909)
This commit is contained in:
parent
6ecadf6398
commit
189e2f617e
4
Cargo.lock
generated
4
Cargo.lock
generated
@ -4836,9 +4836,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "v8"
|
||||
version = "0.40.2"
|
||||
version = "0.41.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "739aa8ce7593f9298bc5a0eb676ba6cb4e48fa0ed51c1aaa2560df7c46c0259b"
|
||||
checksum = "a9c3d267007e1f137d79b4da64267139a86034a4d85df4964334979c1c7a708a"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"fslock",
|
||||
|
@ -25,7 +25,7 @@ serde = { version = "1.0.129", features = ["derive"] }
|
||||
serde_json = { version = "1.0.66", features = ["preserve_order"] }
|
||||
serde_v8 = { version = "0.33.0", path = "../serde_v8" }
|
||||
url = { version = "2.2.2", features = ["serde"] }
|
||||
v8 = "0.40.2"
|
||||
v8 = "0.41.0"
|
||||
|
||||
[[example]]
|
||||
name = "http_bench_json_ops"
|
||||
|
@ -246,7 +246,8 @@ pub fn set_func(
|
||||
|
||||
pub extern "C" fn host_import_module_dynamically_callback(
|
||||
context: v8::Local<v8::Context>,
|
||||
referrer: v8::Local<v8::ScriptOrModule>,
|
||||
_host_defined_options: v8::Local<v8::Data>,
|
||||
resource_name: v8::Local<v8::Value>,
|
||||
specifier: v8::Local<v8::String>,
|
||||
import_assertions: v8::Local<v8::FixedArray>,
|
||||
) -> *mut v8::Promise {
|
||||
@ -257,18 +258,11 @@ pub extern "C" fn host_import_module_dynamically_callback(
|
||||
.to_string(scope)
|
||||
.unwrap()
|
||||
.to_rust_string_lossy(scope);
|
||||
let referrer_name = referrer.get_resource_name();
|
||||
let referrer_name_str = referrer_name
|
||||
let referrer_name_str = resource_name
|
||||
.to_string(scope)
|
||||
.unwrap()
|
||||
.to_rust_string_lossy(scope);
|
||||
|
||||
// TODO(ry) I'm not sure what HostDefinedOptions is for or if we're ever going
|
||||
// to use it. For now we check that it is not used. This check may need to be
|
||||
// changed in the future.
|
||||
let host_defined_options = referrer.get_host_defined_options();
|
||||
assert_eq!(host_defined_options.length(), 0);
|
||||
|
||||
let resolver = v8::PromiseResolver::new(scope).unwrap();
|
||||
let promise = resolver.get_promise(scope);
|
||||
|
||||
|
BIN
core/icudtl.dat
BIN
core/icudtl.dat
Binary file not shown.
@ -196,9 +196,9 @@ impl Drop for JsRuntime {
|
||||
fn v8_init(v8_platform: Option<v8::SharedRef<v8::Platform>>) {
|
||||
// Include 10MB ICU data file.
|
||||
#[repr(C, align(16))]
|
||||
struct IcuData([u8; 10144432]);
|
||||
struct IcuData([u8; 10284336]);
|
||||
static ICU_DATA: IcuData = IcuData(*include_bytes!("icudtl.dat"));
|
||||
v8::icu::set_common_data_69(&ICU_DATA.0).unwrap();
|
||||
v8::icu::set_common_data_70(&ICU_DATA.0).unwrap();
|
||||
|
||||
let v8_platform = v8_platform
|
||||
.unwrap_or_else(|| v8::new_default_platform(0, false).make_shared());
|
||||
|
@ -19,7 +19,7 @@ function assertArrayEquals(a1, a2) {
|
||||
|
||||
function main() {
|
||||
const emptyString = "";
|
||||
const emptyStringSerialized = [255, 14, 34, 0];
|
||||
const emptyStringSerialized = [255, 15, 34, 0];
|
||||
assertArrayEquals(Deno.core.serialize(emptyString), emptyStringSerialized);
|
||||
assert(
|
||||
Deno.core.deserialize(new Uint8Array(emptyStringSerialized)) ===
|
||||
@ -29,7 +29,7 @@ function main() {
|
||||
const primitiveValueArray = ["test", "a", null, undefined];
|
||||
// deno-fmt-ignore
|
||||
const primitiveValueArraySerialized = [
|
||||
255, 14, 65, 4, 34, 4, 116, 101, 115, 116,
|
||||
255, 15, 65, 4, 34, 4, 116, 101, 115, 116,
|
||||
34, 1, 97, 48, 95, 36, 0, 4,
|
||||
];
|
||||
assertArrayEquals(
|
||||
@ -48,7 +48,7 @@ function main() {
|
||||
circularObject.test = circularObject;
|
||||
// deno-fmt-ignore
|
||||
const circularObjectSerialized = [
|
||||
255, 14, 111, 34, 4, 116, 101, 115,
|
||||
255, 15, 111, 34, 4, 116, 101, 115,
|
||||
116, 94, 0, 34, 5, 116, 101, 115,
|
||||
116, 50, 34, 2, 100, 100, 34, 5,
|
||||
116, 101, 115, 116, 51, 34, 2, 97,
|
||||
|
@ -12,7 +12,7 @@ description = "Rust to V8 serialization and deserialization"
|
||||
[dependencies]
|
||||
serde = { version = "1.0.130", features = ["derive"] }
|
||||
serde_bytes = "0.11"
|
||||
v8 = "0.40.2"
|
||||
v8 = "0.41.0"
|
||||
|
||||
[dev-dependencies]
|
||||
bencher = "0.1"
|
||||
|
@ -55,5 +55,5 @@ fn main() {
|
||||
unsafe {
|
||||
v8::V8::dispose();
|
||||
}
|
||||
v8::V8::shutdown_platform();
|
||||
v8::V8::dispose_platform();
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ pub fn v8_shutdown() {
|
||||
unsafe {
|
||||
v8::V8::dispose();
|
||||
}
|
||||
v8::V8::shutdown_platform();
|
||||
v8::V8::dispose_platform();
|
||||
}
|
||||
|
||||
pub fn v8_do(f: impl FnOnce()) {
|
||||
|
Loading…
Reference in New Issue
Block a user