mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Update SpiderMonkey to m-c bcf4ff0c3eef.
This currently breaks Servo on Android, because there are a number of interdependent changes that cannot easily land serially in a way that keeps it working throughout. We expect to fix this in the near future.
This commit is contained in:
parent
a0c502261d
commit
89efccc426
7 changed files with 224 additions and 115 deletions
|
@ -11,7 +11,7 @@ use dom::bindings::guard::Guard;
|
|||
use dom::bindings::utils::get_proto_or_iface_array;
|
||||
use js::error::throw_type_error;
|
||||
use js::glue::{RUST_SYMBOL_TO_JSID, UncheckedUnwrapObject};
|
||||
use js::jsapi::{Class, ClassExtension, ClassSpec, GetGlobalForObjectCrossCompartment};
|
||||
use js::jsapi::{Class, ClassOps, GetGlobalForObjectCrossCompartment};
|
||||
use js::jsapi::{GetWellKnownSymbol, HandleObject, HandleValue, JSClass, JSContext};
|
||||
use js::jsapi::{JSFunctionSpec, JSNative, JSFUN_CONSTRUCTOR, JSPROP_ENUMERATE};
|
||||
use js::jsapi::{JSPROP_PERMANENT, JSPROP_READONLY, JSPROP_RESOLVING, JSPropertySpec};
|
||||
|
@ -101,6 +101,21 @@ unsafe extern "C" fn fun_to_string_hook(cx: *mut JSContext,
|
|||
ret
|
||||
}
|
||||
|
||||
const OBJECT_OPS: ObjectOps = ObjectOps {
|
||||
lookupProperty: None,
|
||||
defineProperty: None,
|
||||
hasProperty: None,
|
||||
getProperty: None,
|
||||
setProperty: None,
|
||||
getOwnPropertyDescriptor: None,
|
||||
deleteProperty: None,
|
||||
watch: None,
|
||||
unwatch: None,
|
||||
getElements: None,
|
||||
enumerate: None,
|
||||
funToString: Some(fun_to_string_hook),
|
||||
};
|
||||
|
||||
/// The class of a non-callback interface object.
|
||||
#[derive(Copy, Clone)]
|
||||
pub struct NonCallbackInterfaceObjectClass {
|
||||
|
@ -117,58 +132,39 @@ pub struct NonCallbackInterfaceObjectClass {
|
|||
unsafe impl Sync for NonCallbackInterfaceObjectClass {}
|
||||
|
||||
impl NonCallbackInterfaceObjectClass {
|
||||
/// Create `ClassOps` for a `NonCallbackInterfaceObjectClass`.
|
||||
pub const fn ops(constructor_behavior: InterfaceConstructorBehavior)
|
||||
-> ClassOps {
|
||||
ClassOps {
|
||||
addProperty: None,
|
||||
delProperty: None,
|
||||
getProperty: None,
|
||||
setProperty: None,
|
||||
enumerate: None,
|
||||
resolve: None,
|
||||
mayResolve: None,
|
||||
finalize: None,
|
||||
call: constructor_behavior.call,
|
||||
construct: constructor_behavior.construct,
|
||||
hasInstance: Some(has_instance_hook),
|
||||
trace: None,
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a new `NonCallbackInterfaceObjectClass` structure.
|
||||
pub const fn new(
|
||||
constructor_behavior: InterfaceConstructorBehavior,
|
||||
string_rep: &'static [u8],
|
||||
proto_id: PrototypeList::ID,
|
||||
proto_depth: u16)
|
||||
-> NonCallbackInterfaceObjectClass {
|
||||
pub const fn new(ops: &'static ClassOps,
|
||||
string_rep: &'static [u8],
|
||||
proto_id: PrototypeList::ID,
|
||||
proto_depth: u16)
|
||||
-> NonCallbackInterfaceObjectClass {
|
||||
NonCallbackInterfaceObjectClass {
|
||||
class: Class {
|
||||
name: b"Function\0" as *const _ as *const libc::c_char,
|
||||
flags: 0,
|
||||
addProperty: None,
|
||||
delProperty: None,
|
||||
getProperty: None,
|
||||
setProperty: None,
|
||||
enumerate: None,
|
||||
resolve: None,
|
||||
mayResolve: None,
|
||||
finalize: None,
|
||||
call: constructor_behavior.call,
|
||||
construct: constructor_behavior.construct,
|
||||
hasInstance: Some(has_instance_hook),
|
||||
trace: None,
|
||||
spec: ClassSpec {
|
||||
createConstructor_: None,
|
||||
createPrototype_: None,
|
||||
constructorFunctions_: ptr::null(),
|
||||
constructorProperties_: ptr::null(),
|
||||
prototypeFunctions_: ptr::null(),
|
||||
prototypeProperties_: ptr::null(),
|
||||
finishInit_: None,
|
||||
flags: 0,
|
||||
},
|
||||
ext: ClassExtension {
|
||||
isWrappedNative: false,
|
||||
weakmapKeyDelegateOp: None,
|
||||
objectMovedOp: None,
|
||||
},
|
||||
ops: ObjectOps {
|
||||
lookupProperty: None,
|
||||
defineProperty: None,
|
||||
hasProperty: None,
|
||||
getProperty: None,
|
||||
setProperty: None,
|
||||
getOwnPropertyDescriptor: None,
|
||||
deleteProperty: None,
|
||||
watch: None,
|
||||
unwatch: None,
|
||||
getElements: None,
|
||||
enumerate: None,
|
||||
funToString: Some(fun_to_string_hook),
|
||||
}
|
||||
cOps: ops,
|
||||
spec: ptr::null(),
|
||||
ext: ptr::null(),
|
||||
oOps: &OBJECT_OPS,
|
||||
},
|
||||
proto_id: proto_id,
|
||||
proto_depth: proto_depth,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue