aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings/codegen
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2016-07-28 06:58:59 -0500
committerGitHub <noreply@github.com>2016-07-28 06:58:59 -0500
commit5ae1fcd6fe35f942f1cb29fd0efdc9c2de393ee6 (patch)
treea9958e813191fe93abb9552644ea06a1ffd24069 /components/script/dom/bindings/codegen
parent45209b7ffea7b2355e227719ed29cb6aa6f00e0f (diff)
parent89efccc4267706eec8d1cd32043bb25d7f37f9b2 (diff)
downloadservo-5ae1fcd6fe35f942f1cb29fd0efdc9c2de393ee6.tar.gz
servo-5ae1fcd6fe35f942f1cb29fd0efdc9c2de393ee6.zip
Auto merge of #12255 - servo:smup, r=jdm
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. <!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12255) <!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom/bindings/codegen')
-rw-r--r--components/script/dom/bindings/codegen/CodegenRust.py84
1 files changed, 26 insertions, 58 deletions
diff --git a/components/script/dom/bindings/codegen/CodegenRust.py b/components/script/dom/bindings/codegen/CodegenRust.py
index 8360dfc322a..2e0dc2415dd 100644
--- a/components/script/dom/bindings/codegen/CodegenRust.py
+++ b/components/script/dom/bindings/codegen/CodegenRust.py
@@ -1872,56 +1872,31 @@ class CGDOMJSClass(CGThing):
elif self.descriptor.weakReferenceable:
args["slots"] = "2"
return """\
+static CLASS_OPS: js::jsapi::ClassOps = js::jsapi::ClassOps {
+ addProperty: None,
+ delProperty: None,
+ getProperty: None,
+ setProperty: None,
+ enumerate: %(enumerateHook)s,
+ resolve: %(resolveHook)s,
+ mayResolve: None,
+ finalize: Some(%(finalizeHook)s),
+ call: None,
+ hasInstance: None,
+ construct: None,
+ trace: Some(%(traceHook)s),
+};
+
static Class: DOMJSClass = DOMJSClass {
base: js::jsapi::Class {
name: %(name)s as *const u8 as *const libc::c_char,
flags: JSCLASS_IS_DOMJSCLASS | %(flags)s |
(((%(slots)s) & JSCLASS_RESERVED_SLOTS_MASK) << JSCLASS_RESERVED_SLOTS_SHIFT)
/* JSCLASS_HAS_RESERVED_SLOTS(%(slots)s) */,
- addProperty: None,
- delProperty: None,
- getProperty: None,
- setProperty: None,
- enumerate: %(enumerateHook)s,
- resolve: %(resolveHook)s,
- mayResolve: None,
- finalize: Some(%(finalizeHook)s),
- call: None,
- hasInstance: None,
- construct: None,
- trace: Some(%(traceHook)s),
-
- spec: js::jsapi::ClassSpec {
- createConstructor_: None,
- createPrototype_: None,
- constructorFunctions_: 0 as *const js::jsapi::JSFunctionSpec,
- constructorProperties_: 0 as *const js::jsapi::JSPropertySpec,
- prototypeFunctions_: 0 as *const js::jsapi::JSFunctionSpec,
- prototypeProperties_: 0 as *const js::jsapi::JSPropertySpec,
- finishInit_: None,
- flags: 0,
- },
-
- ext: js::jsapi::ClassExtension {
- isWrappedNative: false,
- weakmapKeyDelegateOp: None,
- objectMovedOp: None,
- },
-
- ops: js::jsapi::ObjectOps {
- lookupProperty: None,
- defineProperty: None,
- hasProperty: None,
- getProperty: None,
- setProperty: None,
- getOwnPropertyDescriptor: None,
- deleteProperty: None,
- watch: None,
- unwatch: None,
- getElements: None,
- enumerate: None,
- funToString: None,
- },
+ cOps: &CLASS_OPS,
+ spec: ptr::null(),
+ ext: ptr::null(),
+ oOps: ptr::null(),
},
dom_class: %(domClass)s
};""" % args
@@ -1947,19 +1922,8 @@ static PrototypeClass: JSClass = JSClass {
flags:
// JSCLASS_HAS_RESERVED_SLOTS(%(slotCount)s)
(%(slotCount)s & JSCLASS_RESERVED_SLOTS_MASK) << JSCLASS_RESERVED_SLOTS_SHIFT,
- addProperty: None,
- delProperty: None,
- getProperty: None,
- setProperty: None,
- enumerate: None,
- resolve: None,
- mayResolve: None,
- finalize: None,
- call: None,
- hasInstance: None,
- construct: None,
- trace: None,
- reserved: [0 as *mut os::raw::c_void; 23]
+ cOps: 0 as *const _,
+ reserved: [0 as *mut os::raw::c_void; 3]
};
""" % {'name': name, 'slotCount': slotCount}
@@ -1983,9 +1947,12 @@ class CGInterfaceObjectJSClass(CGThing):
"depth": self.descriptor.prototypeDepth
}
return """\
+static INTERFACE_OBJECT_OPS: js::jsapi::ClassOps =
+ NonCallbackInterfaceObjectClass::ops(%(constructorBehavior)s);
+
static InterfaceObjectClass: NonCallbackInterfaceObjectClass =
NonCallbackInterfaceObjectClass::new(
- %(constructorBehavior)s,
+ &INTERFACE_OBJECT_OPS,
%(representation)s,
PrototypeList::ID::%(id)s,
%(depth)s);
@@ -2772,6 +2739,7 @@ let traps = ProxyTraps {
ownPropertyKeys: Some(own_property_keys),
delete_: Some(%(delete)s),
enumerate: None,
+ getPrototypeIfOrdinary: Some(proxyhandler::get_prototype_if_ordinary),
preventExtensions: Some(proxyhandler::prevent_extensions),
isExtensible: Some(proxyhandler::is_extensible),
has: None,