mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Auto merge of #28365 - sagudev:master, r=jdm
Update mozjs to 88 https://github.com/servo/rust-mozjs/pull/541
This commit is contained in:
commit
d35f1ee5e7
5 changed files with 33 additions and 49 deletions
45
Cargo.lock
generated
45
Cargo.lock
generated
|
@ -266,16 +266,15 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bindgen"
|
name = "bindgen"
|
||||||
version = "0.53.3"
|
version = "0.58.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "c72a978d268b1d70b0e963217e60fdabd9523a941457a6c42a7315d15c7e89e5"
|
checksum = "0f8523b410d7187a43085e7e064416ea32ded16bd0a4e6fc025e21616d01258f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags",
|
"bitflags",
|
||||||
"cexpr",
|
"cexpr",
|
||||||
"cfg-if 0.1.10",
|
|
||||||
"clang-sys",
|
"clang-sys",
|
||||||
"clap",
|
"clap",
|
||||||
"env_logger 0.7.1",
|
"env_logger 0.8.2",
|
||||||
"lazy_static",
|
"lazy_static",
|
||||||
"lazycell",
|
"lazycell",
|
||||||
"log",
|
"log",
|
||||||
|
@ -677,13 +676,13 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "clang-sys"
|
name = "clang-sys"
|
||||||
version = "0.29.3"
|
version = "1.2.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "fe6837df1d5cba2397b835c8530f51723267e16abbf83892e9e5af4f0e5dd10a"
|
checksum = "853eda514c284c2287f4bf20ae614f8781f40a81d32ecda6e91449304dfe077c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"glob",
|
"glob",
|
||||||
"libc",
|
"libc",
|
||||||
"libloading 0.5.2",
|
"libloading 0.7.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -1610,11 +1609,8 @@ version = "0.7.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36"
|
checksum = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"atty",
|
|
||||||
"humantime 1.3.0",
|
|
||||||
"log",
|
"log",
|
||||||
"regex",
|
"regex",
|
||||||
"termcolor",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -1624,7 +1620,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "f26ecb66b4bdca6c1409b40fb255eefc2bd4f6d135dab3c3124f80ffa2a9661e"
|
checksum = "f26ecb66b4bdca6c1409b40fb255eefc2bd4f6d135dab3c3124f80ffa2a9661e"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"atty",
|
"atty",
|
||||||
"humantime 2.0.1",
|
"humantime",
|
||||||
"log",
|
"log",
|
||||||
"regex",
|
"regex",
|
||||||
"termcolor",
|
"termcolor",
|
||||||
|
@ -2763,15 +2759,6 @@ version = "1.3.6"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "bc35c995b9d93ec174cf9a27d425c7892722101e14993cd227fdb51d70cf9589"
|
checksum = "bc35c995b9d93ec174cf9a27d425c7892722101e14993cd227fdb51d70cf9589"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "humantime"
|
|
||||||
version = "1.3.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f"
|
|
||||||
dependencies = [
|
|
||||||
"quick-error",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "humantime"
|
name = "humantime"
|
||||||
version = "2.0.1"
|
version = "2.0.1"
|
||||||
|
@ -3824,7 +3811,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "mozjs"
|
name = "mozjs"
|
||||||
version = "0.14.1"
|
version = "0.14.1"
|
||||||
source = "git+https://github.com/servo/rust-mozjs#ef63e568c6aaa1c0f0d1c11f49a99acff1306709"
|
source = "git+https://github.com/servo/rust-mozjs#fe738cca3320ffcbc4c520ced79c2141ceabf42d"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cc",
|
"cc",
|
||||||
"lazy_static",
|
"lazy_static",
|
||||||
|
@ -3837,7 +3824,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "mozjs_sys"
|
name = "mozjs_sys"
|
||||||
version = "0.68.2"
|
version = "0.68.2"
|
||||||
source = "git+https://github.com/servo/mozjs?rev=95387f7235ae9ba950a8dbebb850f41709ff5b1d#95387f7235ae9ba950a8dbebb850f41709ff5b1d"
|
source = "git+https://github.com/servo/mozjs?rev=de147f0cf52da9c84fa95edf09c5f9f84695088c#de147f0cf52da9c84fa95edf09c5f9f84695088c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bindgen",
|
"bindgen",
|
||||||
"cc",
|
"cc",
|
||||||
|
@ -4777,12 +4764,6 @@ dependencies = [
|
||||||
"time",
|
"time",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "quick-error"
|
|
||||||
version = "1.2.1"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "eda5fe9b71976e62bc81b781206aaa076401769b2143379d3eb2118388babac4"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "quickcheck"
|
name = "quickcheck"
|
||||||
version = "0.9.2"
|
version = "0.9.2"
|
||||||
|
@ -5820,9 +5801,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "shlex"
|
name = "shlex"
|
||||||
version = "0.1.1"
|
version = "1.0.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "7fdf1b9db47230893d76faad238fd6097fd6d6a9245cd7a4d90dbd639536bbd2"
|
checksum = "42a568c8f2cd051a4d283bd6eb0343ac214c1b0f1ac19f93e1175b2dee38c73d"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "sig"
|
name = "sig"
|
||||||
|
@ -7244,7 +7225,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "webxr"
|
name = "webxr"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
source = "git+https://github.com/servo/webxr#80700ee558b466f68f4a54cc50a9744c02cf7a42"
|
source = "git+https://github.com/servo/webxr#af2e84a28d52521212816584e0553aaf364a9162"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"android_injected_glue",
|
"android_injected_glue",
|
||||||
"bindgen",
|
"bindgen",
|
||||||
|
@ -7267,7 +7248,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "webxr-api"
|
name = "webxr-api"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
source = "git+https://github.com/servo/webxr#80700ee558b466f68f4a54cc50a9744c02cf7a42"
|
source = "git+https://github.com/servo/webxr#af2e84a28d52521212816584e0553aaf364a9162"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"euclid",
|
"euclid",
|
||||||
"ipc-channel",
|
"ipc-channel",
|
||||||
|
|
|
@ -1833,6 +1833,7 @@ class AttrDefiner(PropertyDefiner):
|
||||||
"name": m.identifier.name,
|
"name": m.identifier.name,
|
||||||
"attr": m,
|
"attr": m,
|
||||||
"flags": "JSPROP_ENUMERATE",
|
"flags": "JSPROP_ENUMERATE",
|
||||||
|
"is_accessor": "true",
|
||||||
}
|
}
|
||||||
for m in descriptor.interface.members if
|
for m in descriptor.interface.members if
|
||||||
m.isAttr() and m.isStatic() == static
|
m.isAttr() and m.isStatic() == static
|
||||||
|
@ -1847,7 +1848,8 @@ class AttrDefiner(PropertyDefiner):
|
||||||
self.regular.append({
|
self.regular.append({
|
||||||
"name": "@@toStringTag",
|
"name": "@@toStringTag",
|
||||||
"attr": None,
|
"attr": None,
|
||||||
"flags": "JSPROP_READONLY | JSPROP_INTERNAL_USE_BIT"
|
"flags": "JSPROP_READONLY",
|
||||||
|
"is_accessor": "false",
|
||||||
})
|
})
|
||||||
|
|
||||||
def generateArray(self, array, name):
|
def generateArray(self, array, name):
|
||||||
|
@ -1897,23 +1899,24 @@ class AttrDefiner(PropertyDefiner):
|
||||||
|
|
||||||
def specData(attr):
|
def specData(attr):
|
||||||
if attr["name"] == "@@toStringTag":
|
if attr["name"] == "@@toStringTag":
|
||||||
return (attr["name"][2:], attr["flags"],
|
return (attr["name"][2:], attr["flags"], attr["is_accessor"],
|
||||||
str_to_const_array(self.descriptor.interface.getClassName()))
|
str_to_const_array(self.descriptor.interface.getClassName()))
|
||||||
|
|
||||||
flags = attr["flags"]
|
flags = attr["flags"]
|
||||||
if self.unforgeable:
|
if self.unforgeable:
|
||||||
flags += " | JSPROP_PERMANENT"
|
flags += " | JSPROP_PERMANENT"
|
||||||
return (str_to_const_array(attr["attr"].identifier.name), flags, getter(attr),
|
return (str_to_const_array(attr["attr"].identifier.name), flags, attr["is_accessor"], getter(attr),
|
||||||
setter(attr))
|
setter(attr))
|
||||||
|
|
||||||
def template(m):
|
def template(m):
|
||||||
if m["name"] == "@@toStringTag":
|
if m["name"] == "@@toStringTag":
|
||||||
return """ JSPropertySpec {
|
return """ JSPropertySpec {
|
||||||
name: JSPropertySpec_Name { symbol_: SymbolCode::%s as usize + 1 },
|
name: JSPropertySpec_Name { symbol_: SymbolCode::%s as usize + 1 },
|
||||||
flags_: (%s) as u8,
|
attributes_: (%s) as u8,
|
||||||
|
isAccessor_: (%s),
|
||||||
u: JSPropertySpec_AccessorsOrValue {
|
u: JSPropertySpec_AccessorsOrValue {
|
||||||
value: JSPropertySpec_ValueWrapper {
|
value: JSPropertySpec_ValueWrapper {
|
||||||
type_: JSValueType::JSVAL_TYPE_STRING as _,
|
type_: JSPropertySpec_ValueWrapper_Type::String,
|
||||||
__bindgen_anon_1: JSPropertySpec_ValueWrapper__bindgen_ty_1 {
|
__bindgen_anon_1: JSPropertySpec_ValueWrapper__bindgen_ty_1 {
|
||||||
string: %s as *const u8 as *const libc::c_char,
|
string: %s as *const u8 as *const libc::c_char,
|
||||||
}
|
}
|
||||||
|
@ -1923,7 +1926,8 @@ class AttrDefiner(PropertyDefiner):
|
||||||
"""
|
"""
|
||||||
return """ JSPropertySpec {
|
return """ JSPropertySpec {
|
||||||
name: JSPropertySpec_Name { string_: %s as *const u8 as *const libc::c_char },
|
name: JSPropertySpec_Name { string_: %s as *const u8 as *const libc::c_char },
|
||||||
flags_: (%s) as u8,
|
attributes_: (%s) as u8,
|
||||||
|
isAccessor_: (%s),
|
||||||
u: JSPropertySpec_AccessorsOrValue {
|
u: JSPropertySpec_AccessorsOrValue {
|
||||||
accessors: JSPropertySpec_AccessorsOrValue_Accessors {
|
accessors: JSPropertySpec_AccessorsOrValue_Accessors {
|
||||||
getter: JSPropertySpec_Accessor {
|
getter: JSPropertySpec_Accessor {
|
||||||
|
@ -2923,7 +2927,7 @@ let root = raw.reflect_with(obj.get());
|
||||||
let _ac = JSAutoRealm::new(*cx, obj.get());
|
let _ac = JSAutoRealm::new(*cx, obj.get());
|
||||||
rooted!(in(*cx) let mut proto = ptr::null_mut::<JSObject>());
|
rooted!(in(*cx) let mut proto = ptr::null_mut::<JSObject>());
|
||||||
GetProtoObject(cx, obj.handle(), proto.handle_mut());
|
GetProtoObject(cx, obj.handle(), proto.handle_mut());
|
||||||
assert!(JS_SplicePrototype(*cx, obj.handle(), proto.handle()));
|
assert!(JS_SetPrototype(*cx, obj.handle(), proto.handle()));
|
||||||
let mut immutable = false;
|
let mut immutable = false;
|
||||||
assert!(JS_SetImmutablePrototype(*cx, obj.handle(), &mut immutable));
|
assert!(JS_SetImmutablePrototype(*cx, obj.handle(), &mut immutable));
|
||||||
assert!(immutable);
|
assert!(immutable);
|
||||||
|
@ -4107,6 +4111,7 @@ class CGMemberJITInfo(CGThing):
|
||||||
protoID: PrototypeList::ID::${name} as u16,
|
protoID: PrototypeList::ID::${name} as u16,
|
||||||
},
|
},
|
||||||
__bindgen_anon_3: JSJitInfo__bindgen_ty_3 { depth: ${depth} },
|
__bindgen_anon_3: JSJitInfo__bindgen_ty_3 { depth: ${depth} },
|
||||||
|
_bitfield_align_1: [],
|
||||||
_bitfield_1: __BindgenBitfieldUnit::new(
|
_bitfield_1: __BindgenBitfieldUnit::new(
|
||||||
new_jsjitinfo_bitfield_1!(
|
new_jsjitinfo_bitfield_1!(
|
||||||
JSJitInfo_OpType::${opType} as u8,
|
JSJitInfo_OpType::${opType} as u8,
|
||||||
|
@ -6090,13 +6095,13 @@ def generate_imports(config, cgthings, descriptors, callbacks=None, dictionaries
|
||||||
'js::jsapi::JSPROP_ENUMERATE',
|
'js::jsapi::JSPROP_ENUMERATE',
|
||||||
'js::jsapi::JSPROP_PERMANENT',
|
'js::jsapi::JSPROP_PERMANENT',
|
||||||
'js::jsapi::JSPROP_READONLY',
|
'js::jsapi::JSPROP_READONLY',
|
||||||
'js::jsapi::JSPROP_INTERNAL_USE_BIT',
|
|
||||||
'js::jsapi::JSPropertySpec',
|
'js::jsapi::JSPropertySpec',
|
||||||
'js::jsapi::JSPropertySpec_Accessor',
|
'js::jsapi::JSPropertySpec_Accessor',
|
||||||
'js::jsapi::JSPropertySpec_AccessorsOrValue',
|
'js::jsapi::JSPropertySpec_AccessorsOrValue',
|
||||||
'js::jsapi::JSPropertySpec_AccessorsOrValue_Accessors',
|
'js::jsapi::JSPropertySpec_AccessorsOrValue_Accessors',
|
||||||
'js::jsapi::JSPropertySpec_Name',
|
'js::jsapi::JSPropertySpec_Name',
|
||||||
'js::jsapi::JSPropertySpec_ValueWrapper',
|
'js::jsapi::JSPropertySpec_ValueWrapper',
|
||||||
|
'js::jsapi::JSPropertySpec_ValueWrapper_Type',
|
||||||
'js::jsapi::JSPropertySpec_ValueWrapper__bindgen_ty_1',
|
'js::jsapi::JSPropertySpec_ValueWrapper__bindgen_ty_1',
|
||||||
'js::jsapi::JSString',
|
'js::jsapi::JSString',
|
||||||
'js::jsapi::JSTracer',
|
'js::jsapi::JSTracer',
|
||||||
|
@ -6130,7 +6135,6 @@ def generate_imports(config, cgthings, descriptors, callbacks=None, dictionaries
|
||||||
'js::rust::wrappers::JS_SetProperty',
|
'js::rust::wrappers::JS_SetProperty',
|
||||||
'js::rust::wrappers::JS_SetPrototype',
|
'js::rust::wrappers::JS_SetPrototype',
|
||||||
'js::jsapi::JS_SetReservedSlot',
|
'js::jsapi::JS_SetReservedSlot',
|
||||||
'js::rust::wrappers::JS_SplicePrototype',
|
|
||||||
'js::rust::wrappers::JS_WrapValue',
|
'js::rust::wrappers::JS_WrapValue',
|
||||||
'js::rust::wrappers::JS_WrapObject',
|
'js::rust::wrappers::JS_WrapObject',
|
||||||
'js::rust::MutableHandle',
|
'js::rust::MutableHandle',
|
||||||
|
|
|
@ -80,7 +80,7 @@ unicode-segmentation = "1.0"
|
||||||
void = "1.0.2"
|
void = "1.0.2"
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
bindgen = { version = "0.53", optional = true, default-features = false }
|
bindgen = { version = "0.58", optional = true, default-features = false }
|
||||||
lazy_static = "1"
|
lazy_static = "1"
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
regex = { version = "1.1", optional = true }
|
regex = { version = "1.1", optional = true }
|
||||||
|
|
|
@ -266,7 +266,7 @@ impl<'a> BuilderWithConfig<'a> {
|
||||||
fn handle_common(self, fixups: &mut Vec<Fixup>) -> BuilderWithConfig<'a> {
|
fn handle_common(self, fixups: &mut Vec<Fixup>) -> BuilderWithConfig<'a> {
|
||||||
self.handle_str_items("headers", |b, item| b.header(add_include(item)))
|
self.handle_str_items("headers", |b, item| b.header(add_include(item)))
|
||||||
.handle_str_items("raw-lines", |b, item| b.raw_line(item))
|
.handle_str_items("raw-lines", |b, item| b.raw_line(item))
|
||||||
.handle_str_items("hide-types", |b, item| b.blacklist_type(item))
|
.handle_str_items("hide-types", |b, item| b.blocklist_type(item))
|
||||||
.handle_table_items("fixups", |builder, item| {
|
.handle_table_items("fixups", |builder, item| {
|
||||||
fixups.push(Fixup {
|
fixups.push(Fixup {
|
||||||
pat: item["pat"].as_str().unwrap().into(),
|
pat: item["pat"].as_str().unwrap().into(),
|
||||||
|
@ -293,16 +293,16 @@ fn generate_structs() {
|
||||||
let mut fixups = vec![];
|
let mut fixups = vec![];
|
||||||
let builder = BuilderWithConfig::new(builder, CONFIG["structs"].as_table().unwrap())
|
let builder = BuilderWithConfig::new(builder, CONFIG["structs"].as_table().unwrap())
|
||||||
.handle_common(&mut fixups)
|
.handle_common(&mut fixups)
|
||||||
.handle_str_items("whitelist-functions", |b, item| b.whitelist_function(item))
|
.handle_str_items("whitelist-functions", |b, item| b.allowlist_function(item))
|
||||||
.handle_str_items("bitfield-enums", |b, item| b.bitfield_enum(item))
|
.handle_str_items("bitfield-enums", |b, item| b.bitfield_enum(item))
|
||||||
.handle_str_items("rusty-enums", |b, item| b.rustified_enum(item))
|
.handle_str_items("rusty-enums", |b, item| b.rustified_enum(item))
|
||||||
.handle_str_items("whitelist-vars", |b, item| b.whitelist_var(item))
|
.handle_str_items("whitelist-vars", |b, item| b.allowlist_var(item))
|
||||||
.handle_str_items("whitelist-types", |b, item| b.whitelist_type(item))
|
.handle_str_items("whitelist-types", |b, item| b.allowlist_type(item))
|
||||||
.handle_str_items("opaque-types", |b, item| b.opaque_type(item))
|
.handle_str_items("opaque-types", |b, item| b.opaque_type(item))
|
||||||
.handle_table_items("cbindgen-types", |b, item| {
|
.handle_table_items("cbindgen-types", |b, item| {
|
||||||
let gecko = item["gecko"].as_str().unwrap();
|
let gecko = item["gecko"].as_str().unwrap();
|
||||||
let servo = item["servo"].as_str().unwrap();
|
let servo = item["servo"].as_str().unwrap();
|
||||||
b.blacklist_type(format!("mozilla::{}", gecko))
|
b.blocklist_type(format!("mozilla::{}", gecko))
|
||||||
.module_raw_line("root::mozilla", format!("pub use {} as {};", servo, gecko))
|
.module_raw_line("root::mozilla", format!("pub use {} as {};", servo, gecko))
|
||||||
})
|
})
|
||||||
.handle_table_items("mapped-generic-types", |builder, item| {
|
.handle_table_items("mapped-generic-types", |builder, item| {
|
||||||
|
@ -320,7 +320,7 @@ fn generate_structs() {
|
||||||
pat: format!("\\broot\\s*::\\s*{}\\b", gecko),
|
pat: format!("\\broot\\s*::\\s*{}\\b", gecko),
|
||||||
rep: format!("crate::gecko_bindings::structs::{}", gecko_name),
|
rep: format!("crate::gecko_bindings::structs::{}", gecko_name),
|
||||||
});
|
});
|
||||||
builder.blacklist_type(gecko).raw_line(format!(
|
builder.blocklist_type(gecko).raw_line(format!(
|
||||||
"pub type {0}{2} = {1}{2};",
|
"pub type {0}{2} = {1}{2};",
|
||||||
gecko_name,
|
gecko_name,
|
||||||
servo,
|
servo,
|
||||||
|
|
|
@ -41,7 +41,6 @@ packages = [
|
||||||
"env_logger",
|
"env_logger",
|
||||||
"fixedbitset",
|
"fixedbitset",
|
||||||
"gleam",
|
"gleam",
|
||||||
"humantime",
|
|
||||||
"libloading",
|
"libloading",
|
||||||
"lock_api",
|
"lock_api",
|
||||||
"memoffset",
|
"memoffset",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue