aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/script/dom/bindings/codegen/CodegenRust.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/script/dom/bindings/codegen/CodegenRust.py')
-rw-r--r--src/components/script/dom/bindings/codegen/CodegenRust.py317
1 files changed, 95 insertions, 222 deletions
diff --git a/src/components/script/dom/bindings/codegen/CodegenRust.py b/src/components/script/dom/bindings/codegen/CodegenRust.py
index cce35ffce82..7c6b7bed88a 100644
--- a/src/components/script/dom/bindings/codegen/CodegenRust.py
+++ b/src/components/script/dom/bindings/codegen/CodegenRust.py
@@ -1089,18 +1089,7 @@ def getWrapTemplateForType(type, descriptorProvider, result, successCode,
return (setValue("(%s).to_jsval(cx)" % result), True)
if type.isEnum():
- if type.nullable():
- raise TypeError("We don't support nullable enumerated return types "
- "yet")
- return ("""assert!((%(result)s as uint) < %(strings)s.len());
-let %(resultStr)s: *JSString = JS_NewStringCopyN(cx, &%(strings)s[%(result)s as u32].value[0] as *i8, %(strings)s[%(result)s as u32].length as libc::size_t);
-if %(resultStr)s.is_null() {
- return 0;
-}
-""" % { "result" : result,
- "resultStr" : result + "_str",
- "strings" : type.inner.identifier.name + "Values::strings" } +
- setValue("StringValue(&*(%s_str))" % result), False)
+ return (setValue("(%s).to_jsval(cx)" % result), True)
if type.isCallback():
assert not type.isInterface()
@@ -1196,9 +1185,10 @@ def getRetvalDeclarationForType(returnType, descriptorProvider):
result = CGWrapper(result, pre="Option<", post=">")
return result
if returnType.isEnum():
+ result = CGGeneric(returnType.unroll().inner.identifier.name)
if returnType.nullable():
- raise TypeError("We don't support nullable enum return values")
- return CGGeneric(returnType.inner.identifier.name)
+ result = CGWrapper(result, pre="Option<", post=">")
+ return result
if returnType.isGeckoInterface():
descriptor = descriptorProvider.getDescriptor(
returnType.unroll().inner.identifier.name)
@@ -1250,23 +1240,13 @@ class PropertyDefiner:
if self.hasNonChromeOnly():
return "s" + self.name
return "ptr::null()"
- def usedForXrays(self, chrome):
- # We only need Xrays for methods, attributes and constants. And we only
- # need them for the non-chrome ones if we have no chromeonly things.
- # Otherwise (we have chromeonly attributes) we need Xrays for the chrome
- # methods/attributes/constants.
- return ((self.name is "Methods" or self.name is "Attributes" or
- self.name is "Constants") and
- chrome == self.hasChromeOnly())
def __str__(self):
# We only need to generate id arrays for things that will end
# up used via ResolveProperty or EnumerateProperties.
- str = self.generateArray(self.regular, self.variableName(False),
- self.usedForXrays(False))
+ str = self.generateArray(self.regular, self.variableName(False))
if self.hasChromeOnly():
- str += self.generateArray(self.chrome, self.variableName(True),
- self.usedForXrays(True))
+ str += self.generateArray(self.chrome, self.variableName(True))
return str
@staticmethod
@@ -1280,7 +1260,7 @@ class PropertyDefiner:
return prefName[0]
def generatePrefableArray(self, array, name, specTemplate, specTerminator,
- specType, getPref, getDataTuple, doIdArrays):
+ specType, getPref, getDataTuple):
"""
This method generates our various arrays.
@@ -1313,8 +1293,6 @@ class PropertyDefiner:
# at the very front of the list.
specs = []
prefableSpecs = []
- if doIdArrays:
- prefableIds = []
prefableTemplate = ' { true, &%s[%d] }'
prefCacheTemplate = '&%s[%d].enabled'
@@ -1345,16 +1323,9 @@ class PropertyDefiner:
specs.append(specTerminator)
prefableSpecs.append(" { false, NULL }");
- arrays = (("static %s: [%s, ..%i] = [\n" +
- ',\n'.join(specs) + "\n" +
- "];\n\n") % (name, specType, len(specs)))
- #+
- #"static Prefable<%s> %s[] = [\n" +
- #',\n'.join(prefableSpecs) + "\n" +
- #"];\n\n")
- if doIdArrays:
- arrays += ("static %s_ids: [jsid, ..%i] = [" % (name, len(specs))) + ", ".join(["JSID_VOID"] * len(specs)) + "];\n\n"
- return arrays
+ return (("static %s: [%s, ..%i] = [\n" +
+ ",\n".join(specs) + "\n" +
+ "];\n\n") % (name, specType, len(specs)))
# The length of a method is the maximum of the lengths of the
# argument lists of all its overloads.
@@ -1390,13 +1361,13 @@ class MethodDefiner(PropertyDefiner):
if any(m.isGetter() and m.isIndexed() for m in methods):
self.chrome.append({"name": 'iterator',
"methodInfo": False,
- "nativeName": "crust::JS_ArrayIterator",
+ "nativeName": "JS_ArrayIterator",
"length": 0,
"flags": "JSPROP_ENUMERATE",
"pref": None })
self.regular.append({"name": 'iterator',
"methodInfo": False,
- "nativeName": "crust::JS_ArrayIterator",
+ "nativeName": "JS_ArrayIterator",
"length": 0,
"flags": "JSPROP_ENUMERATE",
"pref": None })
@@ -1417,7 +1388,7 @@ class MethodDefiner(PropertyDefiner):
# non-static methods go on the interface prototype object
assert not self.hasChromeOnly() and not self.hasNonChromeOnly()
- def generateArray(self, array, name, doIdArrays):
+ def generateArray(self, array, name):
if len(array) == 0:
return ""
@@ -1443,7 +1414,7 @@ class MethodDefiner(PropertyDefiner):
' JSFunctionSpec {name: &%s_name as *u8 as *libc::c_char, call: JSNativeWrapper {op: Some(%s), info: %s}, nargs: %s, flags: %s as u16, selfHostedName: 0 as *libc::c_char }',
' JSFunctionSpec {name: 0 as *libc::c_char, call: JSNativeWrapper {op: None, info: 0 as *JSJitInfo}, nargs: 0, flags: 0, selfHostedName: 0 as *libc::c_char }',
'JSFunctionSpec',
- pref, specData, doIdArrays)
+ pref, specData)
class AttrDefiner(PropertyDefiner):
def __init__(self, descriptor, name):
@@ -1452,7 +1423,7 @@ class AttrDefiner(PropertyDefiner):
self.chrome = [m for m in descriptor.interface.members if m.isAttr()]
self.regular = [m for m in self.chrome if not isChromeOnly(m)]
- def generateArray(self, array, name, doIdArrays):
+ def generateArray(self, array, name):
if len(array) == 0:
return ""
@@ -1491,7 +1462,7 @@ class AttrDefiner(PropertyDefiner):
' JSPropertySpec { name: &%s_name as *u8 as *libc::c_char, tinyid: 0, flags: ((%s) & 0xFF) as u8, getter: %s, setter: %s }',
' JSPropertySpec { name: 0 as *libc::c_char, tinyid: 0, flags: 0, getter: JSPropertyOpWrapper {op: None, info: 0 as *JSJitInfo}, setter: JSStrictPropertyOpWrapper {op: None, info: 0 as *JSJitInfo} }',
'JSPropertySpec',
- PropertyDefiner.getControllingPref, specData, doIdArrays)
+ PropertyDefiner.getControllingPref, specData)
class ConstDefiner(PropertyDefiner):
"""
@@ -1503,7 +1474,7 @@ class ConstDefiner(PropertyDefiner):
self.chrome = [m for m in descriptor.interface.members if m.isConst()]
self.regular = [m for m in self.chrome if not isChromeOnly(m)]
- def generateArray(self, array, name, doIdArrays):
+ def generateArray(self, array, name):
if len(array) == 0:
return ""
@@ -1523,33 +1494,12 @@ class ConstDefiner(PropertyDefiner):
' ConstantSpec { name: &%s_name as *u8 as *libc::c_char, value: %s }',
' ConstantSpec { name: 0 as *libc::c_char, value: VoidVal }',
'ConstantSpec',
- PropertyDefiner.getControllingPref, specData, doIdArrays)
-
-class CGNativePropertyHooks(CGThing):
- """
- Generate a NativePropertyHooks for a given descriptor
- """
- def __init__(self, descriptor):
- CGThing.__init__(self)
- self.descriptor = descriptor
-
- def define(self):
- if self.descriptor.concrete and self.descriptor.proxy:
- resolveOwnProperty = "ResolveOwnProperty"
- enumerateOwnProperties = "EnumerateOwnProperties"
- else:
- enumerateOwnProperties = resolveOwnProperty = "0 as *u8"
- parent = self.descriptor.interface.parent
- parentHooks = ("&" + toBindingNamespace(parent.identifier.name) + "::NativeHooks"
- if parent else '0 as *NativePropertyHooks')
- return """
-static NativeHooks: NativePropertyHooks = NativePropertyHooks { resolve_own_property: /*%s*/ 0 as *u8, resolve_property: ResolveProperty, enumerate_own_properties: /*%s*/ 0 as *u8, enumerate_properties: /*EnumerateProperties*/ 0 as *u8, proto_hooks: /*%s*/ 0 as *NativePropertyHooks };
-""" % (resolveOwnProperty, enumerateOwnProperties, parentHooks)
+ PropertyDefiner.getControllingPref, specData)
# We'll want to insert the indent at the beginnings of lines, but we
# don't want to indent empty lines. So only indent lines that have a
# non-newline character on them.
-lineStartDetector = re.compile("^(?=[^\n#])", re.MULTILINE)
+lineStartDetector = re.compile("^(?=[^\n])", re.MULTILINE)
class CGIndenter(CGThing):
"""
A class that takes another CGThing and generates code that indents that
@@ -1656,8 +1606,7 @@ def DOMClass(descriptor):
protoList.extend(['PrototypeList::id::IDCount'] * (descriptor.config.maxProtoChainLength - len(protoList)))
prototypeChainString = ', '.join(protoList)
return """DOMClass {
- interface_chain: [ %s ],
- native_hooks: &NativeHooks as *NativePropertyHooks
+ interface_chain: [ %s ]
}""" % prototypeChainString
class CGDOMJSClass(CGThing):
@@ -1681,19 +1630,19 @@ static Class_name: [u8, ..%i] = %s;
static Class: DOMJSClass = DOMJSClass {
base: JSClass { name: &Class_name as *u8 as *libc::c_char,
flags: JSCLASS_IS_DOMJSCLASS | %s | (((%s) & JSCLASS_RESERVED_SLOTS_MASK) << JSCLASS_RESERVED_SLOTS_SHIFT), //JSCLASS_HAS_RESERVED_SLOTS(%s),
- addProperty: Some(%s), /* addProperty */
- delProperty: Some(crust::JS_PropertyStub), /* delProperty */
- getProperty: Some(crust::JS_PropertyStub), /* getProperty */
- setProperty: Some(crust::JS_StrictPropertyStub), /* setProperty */
- enumerate: Some(crust::JS_EnumerateStub),
- resolve: Some(crust::JS_ResolveStub),
- convert: Some(crust::JS_ConvertStub),
- finalize: Some(%s), /* finalize */
- checkAccess: None, /* checkAccess */
- call: None, /* call */
- hasInstance: None, /* hasInstance */
- construct: None, /* construct */
- trace: %s, /* trace */
+ addProperty: Some(JS_PropertyStub),
+ delProperty: Some(JS_PropertyStub),
+ getProperty: Some(JS_PropertyStub),
+ setProperty: Some(JS_StrictPropertyStub),
+ enumerate: Some(JS_EnumerateStub),
+ resolve: Some(JS_ResolveStub),
+ convert: Some(JS_ConvertStub),
+ finalize: Some(%s),
+ checkAccess: None,
+ call: None,
+ hasInstance: None,
+ construct: None,
+ trace: %s,
reserved: (0 as *libc::c_void, 0 as *libc::c_void, 0 as *libc::c_void, 0 as *libc::c_void, 0 as *libc::c_void, // 05
0 as *libc::c_void, 0 as *libc::c_void, 0 as *libc::c_void, 0 as *libc::c_void, 0 as *libc::c_void, // 10
0 as *libc::c_void, 0 as *libc::c_void, 0 as *libc::c_void, 0 as *libc::c_void, 0 as *libc::c_void, // 15
@@ -1708,7 +1657,6 @@ static Class: DOMJSClass = DOMJSClass {
""" % (len(self.descriptor.interface.identifier.name) + 1,
str_to_const_array(self.descriptor.interface.identifier.name),
flags, slots, slots,
- 'crust::JS_PropertyStub',
FINALIZE_HOOK_NAME, traceHook,
CGIndenter(CGGeneric(DOMClass(self.descriptor))).define())
@@ -1726,19 +1674,19 @@ static PrototypeClassName__: [u8, ..%s] = %s;
static PrototypeClass: JSClass = JSClass {
name: &PrototypeClassName__ as *u8 as *libc::c_char,
flags: (1 & JSCLASS_RESERVED_SLOTS_MASK) << JSCLASS_RESERVED_SLOTS_SHIFT, //JSCLASS_HAS_RESERVED_SLOTS(1)
- addProperty: Some(crust::JS_PropertyStub), /* addProperty */
- delProperty: Some(crust::JS_PropertyStub), /* delProperty */
- getProperty: Some(crust::JS_PropertyStub), /* getProperty */
- setProperty: Some(crust::JS_StrictPropertyStub), /* setProperty */
- enumerate: Some(crust::JS_EnumerateStub),
- resolve: Some(crust::JS_ResolveStub),
- convert: Some(crust::JS_ConvertStub),
- finalize: None, /* finalize */
- checkAccess: None, /* checkAccess */
- call: None, /* call */
- hasInstance: None, /* hasInstance */
- construct: None, /* construct */
- trace: None, /* trace */
+ addProperty: Some(JS_PropertyStub),
+ delProperty: Some(JS_PropertyStub),
+ getProperty: Some(JS_PropertyStub),
+ setProperty: Some(JS_StrictPropertyStub),
+ enumerate: Some(JS_EnumerateStub),
+ resolve: Some(JS_ResolveStub),
+ convert: Some(JS_ConvertStub),
+ finalize: None,
+ checkAccess: None,
+ call: None,
+ hasInstance: None,
+ construct: None,
+ trace: None,
reserved: (0 as *libc::c_void, 0 as *libc::c_void, 0 as *libc::c_void, 0 as *libc::c_void, 0 as *libc::c_void, // 05
0 as *libc::c_void, 0 as *libc::c_void, 0 as *libc::c_void, 0 as *libc::c_void, 0 as *libc::c_void, // 10
0 as *libc::c_void, 0 as *libc::c_void, 0 as *libc::c_void, 0 as *libc::c_void, 0 as *libc::c_void, // 15
@@ -1764,19 +1712,19 @@ class CGInterfaceObjectJSClass(CGThing):
return """
static InterfaceObjectClass: JSClass = {
%s, 0,
- crust::JS_PropertyStub, /* addProperty */
- crust::JS_PropertyStub, /* delProperty */
- crust::JS_PropertyStub, /* getProperty */
- crust::JS_StrictPropertyStub, /* setProperty */
- crust::JS_EnumerateStub,
- crust::JS_ResolveStub,
- crust::JS_ConvertStub,
- 0 as *u8, /* finalize */
- 0 as *u8, /* checkAccess */
- %s, /* call */
- %s, /* hasInstance */
- %s, /* construct */
- 0 as *u8, /* trace */
+ JS_PropertyStub,
+ JS_PropertyStub,
+ JS_PropertyStub,
+ JS_StrictPropertyStub,
+ JS_EnumerateStub,
+ JS_ResolveStub,
+ JS_ConvertStub,
+ 0 as *u8,
+ 0 as *u8,
+ %s,
+ %s,
+ %s,
+ 0 as *u8,
JSCLASS_NO_INTERNAL_MEMBERS
};
""" % (str_to_const_array("Function"), ctorname, hasinstance, ctorname)
@@ -2336,11 +2284,6 @@ class CGDefineDOMInterfaceMethod(CGAbstractMethod):
""" % (FINALIZE_HOOK_NAME,
('Some(%s)' % TRACE_HOOK_NAME),
self.descriptor.name)
- else:
- body += """ js_info.dom_static.attribute_ids.insert(PrototypeList::id::%s as uint,
- slice::cast_to_mut(slice::from_slice(sAttributes_ids)));
-""" % self.descriptor.name
- body = "" #XXXjdm xray stuff isn't necessary yet
return (body + """ let cx = js_info.js_context.deref().ptr;
let receiver = js_info.js_compartment.global_obj;
@@ -2908,20 +2851,37 @@ def getEnumValueName(value):
class CGEnum(CGThing):
def __init__(self, enum):
CGThing.__init__(self)
- self.enum = enum
+ inner = """
+use dom::bindings::conversions::ToJSValConvertible;
+use js::jsapi::JSContext;
+use js::jsval::JSVal;
- def define(self):
- return """
- #[repr(uint)]
- pub enum valuelist {
- %s
+#[repr(uint)]
+pub enum valuelist {
+ %s
+}
+
+pub static strings: &'static [&'static str] = &[
+ %s,
+];
+
+impl ToJSValConvertible for valuelist {
+ fn to_jsval(&self, cx: *JSContext) -> JSVal {
+ strings[*self as uint].to_owned().to_jsval(cx)
}
+}
+""" % (",\n ".join(map(getEnumValueName, enum.values())),
+ ",\n ".join(['&"%s"' % val for val in enum.values()]))
+
+ self.cgRoot = CGList([
+ CGNamespace.build([enum.identifier.name + "Values"],
+ CGIndenter(CGGeneric(inner)), public=True),
+ CGGeneric("pub type %s = self::%sValues::valuelist;\n" %
+ (enum.identifier.name, enum.identifier.name)),
+ ])
- pub static strings: &'static [EnumEntry] = &[
- %s,
- ];
-""" % (",\n ".join(map(getEnumValueName, self.enum.values())),
- ",\n ".join(['EnumEntry {value: &"' + val + '", length: ' + str(len(val)) + '}' for val in self.enum.values()]))
+ def define(self):
+ return self.cgRoot.define()
def convertConstIDLValueToRust(value):
@@ -3685,72 +3645,6 @@ class CGClass(CGThing):
result += "}"
return result
-
-class CGXrayHelper(CGAbstractExternMethod):
- def __init__(self, descriptor, name, args, properties):
- CGAbstractExternMethod.__init__(self, descriptor, name, "bool", args)
- self.properties = properties
-
- def definition_body(self):
- varNames = self.properties.variableNames(True)
-
- setup = ("let window = global_object_for_js_object(wrapper);\n"
- "let js_info = window.get().page().js_info();\n")
-
- methods = self.properties.methods
- if methods.hasNonChromeOnly() or methods.hasChromeOnly():
- methodArgs = "Some(zip_copies(%(methods)s, *method_ids))" % varNames
- setup += "let method_ids = js_info.get_ref().dom_static.method_ids.get(&(PrototypeList::id::ClientRect as uint));\n"
- else:
- methodArgs = "None"
- methodArgs = CGGeneric(methodArgs)
-
- attrs = self.properties.attrs
- if attrs.hasNonChromeOnly() or attrs.hasChromeOnly():
- attrArgs = "Some(zip_copies(%(attrs)s, *attr_ids))" % varNames
- setup += "let attr_ids = js_info.get_ref().dom_static.attribute_ids.get(&(PrototypeList::id::ClientRect as uint));\n"
- else:
- attrArgs = "None"
- attrArgs = CGGeneric(attrArgs)
-
- consts = self.properties.consts
- if consts.hasNonChromeOnly() or consts.hasChromeOnly():
- constArgs = "Some(zip_copies(%(consts)s, *const_ids))" % varNames
- setup += "let const_ids = js_info.get_ref().dom_static.constant_ids.get(&(PrototypeList::id::ClientRect as uint));\n"
- else:
- constArgs = "None"
- constArgs = CGGeneric(constArgs)
-
- prefixArgs = CGGeneric(self.getPrefixArgs())
-
- return CGIndenter(
- CGWrapper(CGList([prefixArgs, methodArgs, attrArgs, constArgs], ", "),
- pre=(setup + "return Xray%s(" % self.name),
- post=");",
- reindent=True)).define()
-
-class CGResolveProperty(CGXrayHelper):
- def __init__(self, descriptor, properties):
- args = [Argument('*JSContext', 'cx'), Argument('*JSObject', 'wrapper'),
- Argument('jsid', 'id'), Argument('bool', 'set'),
- Argument('*mut JSPropertyDescriptor', 'desc')]
- CGXrayHelper.__init__(self, descriptor, "ResolveProperty", args,
- properties)
-
- def getPrefixArgs(self):
- return "cx, wrapper, id, desc"
-
-
-class CGEnumerateProperties(CGXrayHelper):
- def __init__(self, descriptor, properties):
- args = [Argument('JSContext*', 'cx'), Argument('JSObject*', 'wrapper'),
- Argument('JS::AutoIdVector&', 'props')]
- CGXrayHelper.__init__(self, descriptor, "EnumerateProperties", args,
- properties)
-
- def getPrefixArgs(self):
- return "props"
-
class CGProxySpecialOperation(CGPerSignatureCall):
"""
Base class for classes for calling an indexed or named special operation
@@ -4294,25 +4188,12 @@ class CGDescriptor(CGThing):
CGConstant(m for m in descriptor.interface.members if m.isConst()),
public=True))
- # Set up our Xray callbacks as needed.
- if descriptor.interface.hasInterfacePrototypeObject():
- if descriptor.concrete and descriptor.proxy:
- #cgThings.append(CGResolveOwnProperty(descriptor))
- #cgThings.append(CGEnumerateOwnProperties(descriptor))
- pass
- cgThings.append(CGResolveProperty(descriptor, properties))
- #cgThings.append(CGEnumerateProperties(descriptor, properties))
-
if descriptor.interface.hasInterfaceObject():
cgThings.append(CGDefineDOMInterfaceMethod(descriptor))
if (descriptor.interface.getExtendedAttribute("PrefControlled") is not None):
#cgThings.append(CGPrefEnabled(descriptor))
pass
- if descriptor.interface.hasInterfacePrototypeObject():
- cgThings.append(CGNativePropertyHooks(descriptor))
- pass
-
if descriptor.concrete:
if descriptor.proxy:
#cgThings.append(CGProxyIsProxy(descriptor))
@@ -4656,15 +4537,7 @@ class CGBindingRoot(CGThing):
isCallback=True)
# Do codegen for all the enums
- def makeEnum(e):
- return CGNamespace.build([e.identifier.name + "Values"],
- CGList([CGGeneric(" use dom::bindings::utils::EnumEntry;"),
- CGEnum(e)]), public=True)
- def makeEnumTypedef(e):
- return CGGeneric("pub type %s = self::%sValues::valuelist;\n" %
- (e.identifier.name, e.identifier.name))
- cgthings = [ fun(e) for e in config.getEnums(webIDLFile)
- for fun in [makeEnum, makeEnumTypedef] ]
+ cgthings = [CGEnum(e) for e in config.getEnums(webIDLFile)]
# Do codegen for all the dictionaries. We have to be a bit careful
# here, because we have to generate these in order from least derived
@@ -4713,7 +4586,7 @@ class CGBindingRoot(CGThing):
#XXXjdm This should only import the namespace for the current binding,
# not every binding ever.
curr = CGImports(curr, [
- 'js::{crust, JS_ARGV, JS_CALLEE, JS_THIS_OBJECT}',
+ 'js::{JS_ARGV, JS_CALLEE, JS_THIS_OBJECT}',
'js::{JSCLASS_GLOBAL_SLOT_COUNT, JSCLASS_IS_DOMJSCLASS}',
'js::{JSCLASS_IS_GLOBAL, JSCLASS_RESERVED_SLOTS_SHIFT}',
'js::{JSCLASS_RESERVED_SLOTS_MASK, JSID_VOID, JSJitInfo}',
@@ -4726,9 +4599,10 @@ class CGBindingRoot(CGThing):
'js::jsapi::{JS_NewObject, JS_ObjectIsCallable, JS_SetPrototype}',
'js::jsapi::{JS_SetReservedSlot, JS_WrapValue, JSBool, JSContext}',
'js::jsapi::{JSClass, JSFreeOp, JSFunctionSpec, JSHandleObject, jsid}',
- 'js::jsapi::{JSNativeWrapper, JSObject, JSPropertyDescriptor}',
- 'js::jsapi::{JSPropertyOpWrapper, JSPropertySpec}',
- 'js::jsapi::{JSStrictPropertyOpWrapper, JSString, JSTracer}',
+ 'js::jsapi::{JSNativeWrapper, JSObject, JSPropertyDescriptor, JS_ArrayIterator}',
+ 'js::jsapi::{JSPropertyOpWrapper, JSPropertySpec, JS_PropertyStub}',
+ 'js::jsapi::{JSStrictPropertyOpWrapper, JSString, JSTracer, JS_ConvertStub}',
+ 'js::jsapi::{JS_StrictPropertyStub, JS_EnumerateStub, JS_ResolveStub}',
'js::jsval::JSVal',
'js::jsval::{ObjectValue, ObjectOrNullValue, PrivateValue}',
'js::jsval::{NullValue, UndefinedValue}',
@@ -4746,13 +4620,12 @@ class CGBindingRoot(CGThing):
'dom::bindings::utils::{GetPropertyOnPrototype, GetProtoOrIfaceArray}',
'dom::bindings::utils::{HasPropertyOnPrototype, IntVal}',
'dom::bindings::utils::{jsid_to_str}',
- 'dom::bindings::utils::{NativePropertyHooks}',
'dom::bindings::utils::global_object_for_js_object',
'dom::bindings::utils::{Reflectable}',
'dom::bindings::utils::{squirrel_away_unique}',
'dom::bindings::utils::{ThrowingConstructor, unwrap, unwrap_jsmanaged}',
'dom::bindings::utils::{unwrap_object, VoidVal, with_gc_disabled}',
- 'dom::bindings::utils::{with_gc_enabled, XrayResolveProperty}',
+ 'dom::bindings::utils::{with_gc_enabled}',
'dom::bindings::trace::Traceable',
'dom::bindings::callback::{CallbackContainer,CallbackInterface}',
'dom::bindings::callback::{CallSetup,ExceptionHandling}',
@@ -5839,7 +5712,7 @@ class GlobalGenRoots():
'dom::bindings::error::throw_not_in_union',
'dom::bindings::js::JS',
'dom::types::*',
- 'js::{crust, JS_ARGV, JS_CALLEE, JS_THIS_OBJECT}',
+ 'js::{JS_ARGV, JS_CALLEE, JS_THIS_OBJECT}',
'js::{JSCLASS_GLOBAL_SLOT_COUNT, JSCLASS_IS_DOMJSCLASS}',
'js::{JSCLASS_IS_GLOBAL, JSCLASS_RESERVED_SLOTS_SHIFT}',
'js::{JSCLASS_RESERVED_SLOTS_MASK, JSID_VOID, JSJitInfo}',