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:
bors-servo 2021-04-17 14:46:05 -04:00 committed by GitHub
commit d35f1ee5e7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 33 additions and 49 deletions

45
Cargo.lock generated
View file

@ -266,16 +266,15 @@ dependencies = [
[[package]]
name = "bindgen"
version = "0.53.3"
version = "0.58.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c72a978d268b1d70b0e963217e60fdabd9523a941457a6c42a7315d15c7e89e5"
checksum = "0f8523b410d7187a43085e7e064416ea32ded16bd0a4e6fc025e21616d01258f"
dependencies = [
"bitflags",
"cexpr",
"cfg-if 0.1.10",
"clang-sys",
"clap",
"env_logger 0.7.1",
"env_logger 0.8.2",
"lazy_static",
"lazycell",
"log",
@ -677,13 +676,13 @@ dependencies = [
[[package]]
name = "clang-sys"
version = "0.29.3"
version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fe6837df1d5cba2397b835c8530f51723267e16abbf83892e9e5af4f0e5dd10a"
checksum = "853eda514c284c2287f4bf20ae614f8781f40a81d32ecda6e91449304dfe077c"
dependencies = [
"glob",
"libc",
"libloading 0.5.2",
"libloading 0.7.0",
]
[[package]]
@ -1610,11 +1609,8 @@ version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36"
dependencies = [
"atty",
"humantime 1.3.0",
"log",
"regex",
"termcolor",
]
[[package]]
@ -1624,7 +1620,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f26ecb66b4bdca6c1409b40fb255eefc2bd4f6d135dab3c3124f80ffa2a9661e"
dependencies = [
"atty",
"humantime 2.0.1",
"humantime",
"log",
"regex",
"termcolor",
@ -2763,15 +2759,6 @@ version = "1.3.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
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]]
name = "humantime"
version = "2.0.1"
@ -3824,7 +3811,7 @@ dependencies = [
[[package]]
name = "mozjs"
version = "0.14.1"
source = "git+https://github.com/servo/rust-mozjs#ef63e568c6aaa1c0f0d1c11f49a99acff1306709"
source = "git+https://github.com/servo/rust-mozjs#fe738cca3320ffcbc4c520ced79c2141ceabf42d"
dependencies = [
"cc",
"lazy_static",
@ -3837,7 +3824,7 @@ dependencies = [
[[package]]
name = "mozjs_sys"
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 = [
"bindgen",
"cc",
@ -4777,12 +4764,6 @@ dependencies = [
"time",
]
[[package]]
name = "quick-error"
version = "1.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eda5fe9b71976e62bc81b781206aaa076401769b2143379d3eb2118388babac4"
[[package]]
name = "quickcheck"
version = "0.9.2"
@ -5820,9 +5801,9 @@ dependencies = [
[[package]]
name = "shlex"
version = "0.1.1"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7fdf1b9db47230893d76faad238fd6097fd6d6a9245cd7a4d90dbd639536bbd2"
checksum = "42a568c8f2cd051a4d283bd6eb0343ac214c1b0f1ac19f93e1175b2dee38c73d"
[[package]]
name = "sig"
@ -7244,7 +7225,7 @@ dependencies = [
[[package]]
name = "webxr"
version = "0.0.1"
source = "git+https://github.com/servo/webxr#80700ee558b466f68f4a54cc50a9744c02cf7a42"
source = "git+https://github.com/servo/webxr#af2e84a28d52521212816584e0553aaf364a9162"
dependencies = [
"android_injected_glue",
"bindgen",
@ -7267,7 +7248,7 @@ dependencies = [
[[package]]
name = "webxr-api"
version = "0.0.1"
source = "git+https://github.com/servo/webxr#80700ee558b466f68f4a54cc50a9744c02cf7a42"
source = "git+https://github.com/servo/webxr#af2e84a28d52521212816584e0553aaf364a9162"
dependencies = [
"euclid",
"ipc-channel",

View file

@ -1833,6 +1833,7 @@ class AttrDefiner(PropertyDefiner):
"name": m.identifier.name,
"attr": m,
"flags": "JSPROP_ENUMERATE",
"is_accessor": "true",
}
for m in descriptor.interface.members if
m.isAttr() and m.isStatic() == static
@ -1847,7 +1848,8 @@ class AttrDefiner(PropertyDefiner):
self.regular.append({
"name": "@@toStringTag",
"attr": None,
"flags": "JSPROP_READONLY | JSPROP_INTERNAL_USE_BIT"
"flags": "JSPROP_READONLY",
"is_accessor": "false",
})
def generateArray(self, array, name):
@ -1897,23 +1899,24 @@ class AttrDefiner(PropertyDefiner):
def specData(attr):
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()))
flags = attr["flags"]
if self.unforgeable:
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))
def template(m):
if m["name"] == "@@toStringTag":
return """ JSPropertySpec {
name: JSPropertySpec_Name { symbol_: SymbolCode::%s as usize + 1 },
flags_: (%s) as u8,
attributes_: (%s) as u8,
isAccessor_: (%s),
u: JSPropertySpec_AccessorsOrValue {
value: JSPropertySpec_ValueWrapper {
type_: JSValueType::JSVAL_TYPE_STRING as _,
type_: JSPropertySpec_ValueWrapper_Type::String,
__bindgen_anon_1: JSPropertySpec_ValueWrapper__bindgen_ty_1 {
string: %s as *const u8 as *const libc::c_char,
}
@ -1923,7 +1926,8 @@ class AttrDefiner(PropertyDefiner):
"""
return """ JSPropertySpec {
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 {
accessors: JSPropertySpec_AccessorsOrValue_Accessors {
getter: JSPropertySpec_Accessor {
@ -2923,7 +2927,7 @@ let root = raw.reflect_with(obj.get());
let _ac = JSAutoRealm::new(*cx, obj.get());
rooted!(in(*cx) let mut proto = ptr::null_mut::<JSObject>());
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;
assert!(JS_SetImmutablePrototype(*cx, obj.handle(), &mut immutable));
assert!(immutable);
@ -4107,6 +4111,7 @@ class CGMemberJITInfo(CGThing):
protoID: PrototypeList::ID::${name} as u16,
},
__bindgen_anon_3: JSJitInfo__bindgen_ty_3 { depth: ${depth} },
_bitfield_align_1: [],
_bitfield_1: __BindgenBitfieldUnit::new(
new_jsjitinfo_bitfield_1!(
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_PERMANENT',
'js::jsapi::JSPROP_READONLY',
'js::jsapi::JSPROP_INTERNAL_USE_BIT',
'js::jsapi::JSPropertySpec',
'js::jsapi::JSPropertySpec_Accessor',
'js::jsapi::JSPropertySpec_AccessorsOrValue',
'js::jsapi::JSPropertySpec_AccessorsOrValue_Accessors',
'js::jsapi::JSPropertySpec_Name',
'js::jsapi::JSPropertySpec_ValueWrapper',
'js::jsapi::JSPropertySpec_ValueWrapper_Type',
'js::jsapi::JSPropertySpec_ValueWrapper__bindgen_ty_1',
'js::jsapi::JSString',
'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_SetPrototype',
'js::jsapi::JS_SetReservedSlot',
'js::rust::wrappers::JS_SplicePrototype',
'js::rust::wrappers::JS_WrapValue',
'js::rust::wrappers::JS_WrapObject',
'js::rust::MutableHandle',

View file

@ -80,7 +80,7 @@ unicode-segmentation = "1.0"
void = "1.0.2"
[build-dependencies]
bindgen = { version = "0.53", optional = true, default-features = false }
bindgen = { version = "0.58", optional = true, default-features = false }
lazy_static = "1"
log = "0.4"
regex = { version = "1.1", optional = true }

View file

@ -266,7 +266,7 @@ impl<'a> BuilderWithConfig<'a> {
fn handle_common(self, fixups: &mut Vec<Fixup>) -> BuilderWithConfig<'a> {
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("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| {
fixups.push(Fixup {
pat: item["pat"].as_str().unwrap().into(),
@ -293,16 +293,16 @@ fn generate_structs() {
let mut fixups = vec![];
let builder = BuilderWithConfig::new(builder, CONFIG["structs"].as_table().unwrap())
.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("rusty-enums", |b, item| b.rustified_enum(item))
.handle_str_items("whitelist-vars", |b, item| b.whitelist_var(item))
.handle_str_items("whitelist-types", |b, item| b.whitelist_type(item))
.handle_str_items("whitelist-vars", |b, item| b.allowlist_var(item))
.handle_str_items("whitelist-types", |b, item| b.allowlist_type(item))
.handle_str_items("opaque-types", |b, item| b.opaque_type(item))
.handle_table_items("cbindgen-types", |b, item| {
let gecko = item["gecko"].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))
})
.handle_table_items("mapped-generic-types", |builder, item| {
@ -320,7 +320,7 @@ fn generate_structs() {
pat: format!("\\broot\\s*::\\s*{}\\b", gecko),
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};",
gecko_name,
servo,

View file

@ -41,7 +41,6 @@ packages = [
"env_logger",
"fixedbitset",
"gleam",
"humantime",
"libloading",
"lock_api",
"memoffset",