mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Update mozjs to 88
This commit is contained in:
parent
0d0cfd0303
commit
19be2cd3fa
3 changed files with 15 additions and 12 deletions
4
Cargo.lock
generated
4
Cargo.lock
generated
|
@ -3824,7 +3824,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "mozjs"
|
||||
version = "0.14.1"
|
||||
source = "git+https://github.com/servo/rust-mozjs#ef63e568c6aaa1c0f0d1c11f49a99acff1306709"
|
||||
source = "git+https://github.com/sagudev/rust-mozjs#b676b375fc56f22d6199d462f6c982ef5065e509"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"lazy_static",
|
||||
|
@ -3837,7 +3837,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/sagudev/mozjs?rev=97bfe5925c36659935a472a6b807dddebd0978ed#97bfe5925c36659935a472a6b807dddebd0978ed"
|
||||
dependencies = [
|
||||
"bindgen",
|
||||
"cc",
|
||||
|
|
|
@ -63,7 +63,7 @@ image = "0.23"
|
|||
indexmap = { version = "1.0.2", features = ["std"] }
|
||||
ipc-channel = "0.14"
|
||||
itertools = "0.8"
|
||||
js = { package = "mozjs", git = "https://github.com/servo/rust-mozjs" }
|
||||
js = { package = "mozjs", git = "https://github.com/sagudev/rust-mozjs" }
|
||||
jstraceable_derive = { path = "../jstraceable_derive" }
|
||||
keyboard-types = "0.5"
|
||||
lazy_static = "1"
|
||||
|
|
|
@ -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);
|
||||
|
@ -6090,13 +6094,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 +6134,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',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue