aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings/codegen/CodegenRust.py
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/bindings/codegen/CodegenRust.py')
-rw-r--r--components/script/dom/bindings/codegen/CodegenRust.py28
1 files changed, 14 insertions, 14 deletions
diff --git a/components/script/dom/bindings/codegen/CodegenRust.py b/components/script/dom/bindings/codegen/CodegenRust.py
index 4a760225cf4..b34c6441b70 100644
--- a/components/script/dom/bindings/codegen/CodegenRust.py
+++ b/components/script/dom/bindings/codegen/CodegenRust.py
@@ -104,8 +104,8 @@ class CastableObjectUnwrapper():
self.substitution = {
"type": descriptor.nativeType,
"depth": descriptor.interface.inheritanceDepth(),
- "prototype": "PrototypeList::id::" + descriptor.name,
- "protoID": "PrototypeList::id::" + descriptor.name + " as uint",
+ "prototype": "PrototypeList::ID::" + descriptor.name,
+ "protoID": "PrototypeList::ID::" + descriptor.name + " as uint",
"source": source,
"codeOnFailure": CGIndenter(CGGeneric(codeOnFailure), 4).define(),
}
@@ -1418,12 +1418,12 @@ class CGNamespace(CGWrapper):
return CGNamespace(namespaces[0], inner, public=public)
def DOMClass(descriptor):
- protoList = ['PrototypeList::id::' + proto for proto in descriptor.prototypeChain]
- # Pad out the list to the right length with id::Count so we
+ protoList = ['PrototypeList::ID::' + proto for proto in descriptor.prototypeChain]
+ # Pad out the list to the right length with ID::Count so we
# guarantee that all the lists are the same length. id::Count
# is never the ID of any prototype, so it's safe to use as
# padding.
- protoList.extend(['PrototypeList::id::Count'] * (descriptor.config.maxProtoChainLength - len(protoList)))
+ protoList.extend(['PrototypeList::ID::Count'] * (descriptor.config.maxProtoChainLength - len(protoList)))
prototypeChainString = ', '.join(protoList)
return """DOMClass {
interface_chain: [ %s ],
@@ -1801,7 +1801,7 @@ def CreateBindingJSObject(descriptor, parent=None):
if descriptor.proxy:
assert not descriptor.isGlobal()
create += """
-let handler = RegisterBindings::proxy_handlers[PrototypeList::proxies::%s as uint];
+let handler = RegisterBindings::proxy_handlers[PrototypeList::Proxies::%s as uint];
let mut private = PrivateValue(squirrel_away_unique(aObject) as *const libc::c_void);
let obj = with_compartment(aCx, proto, || {
NewProxyObject(aCx, handler,
@@ -1887,8 +1887,8 @@ class CGIDLInterface(CGThing):
}
return string.Template("""
impl IDLInterface for ${type} {
- fn get_prototype_id(_: Option<${type}>) -> PrototypeList::id {
- PrototypeList::id::${type}
+ fn get_prototype_id(_: Option<${type}>) -> PrototypeList::ID {
+ PrototypeList::ID::${type}
}
fn get_prototype_depth(_: Option<${type}>) -> uint {
${depth}
@@ -2023,7 +2023,7 @@ class CGGetPerInterfaceObject(CGAbstractMethod):
Argument('*mut JSObject', 'aReceiver')]
CGAbstractMethod.__init__(self, descriptor, name,
'*mut JSObject', args, pub=pub)
- self.id = idPrefix + "id::" + self.descriptor.name
+ self.id = idPrefix + "ID::" + self.descriptor.name
def definition_body(self):
return CGGeneric("""
@@ -2682,7 +2682,7 @@ class CGMemberJITInfo(CGThing):
self.descriptor = descriptor
def defineJitInfo(self, infoName, opName, infallible):
- protoID = "PrototypeList::id::%s as u32" % self.descriptor.name
+ protoID = "PrototypeList::ID::%s as u32" % self.descriptor.name
depth = self.descriptor.interface.inheritanceDepth()
failstr = "true" if infallible else "false"
return ("\n"
@@ -4397,7 +4397,7 @@ class CGRegisterProxyHandlersMethod(CGAbstractMethod):
def definition_body(self):
return CGList([
- CGGeneric("proxy_handlers[proxies::%s as uint] = codegen::Bindings::%sBinding::DefineProxyHandler();" % (desc.name, desc.name))
+ CGGeneric("proxy_handlers[Proxies::%s as uint] = codegen::Bindings::%sBinding::DefineProxyHandler();" % (desc.name, desc.name))
for desc in self.descriptors
], "\n")
@@ -5135,8 +5135,8 @@ class GlobalGenRoots():
return CGList([
CGGeneric(AUTOGENERATED_WARNING_COMMENT),
CGGeneric("pub const MAX_PROTO_CHAIN_LENGTH: uint = %d;\n\n" % config.maxProtoChainLength),
- CGNonNamespacedEnum('id', protos, [0], deriving="PartialEq"),
- CGNonNamespacedEnum('proxies', proxies, [0], deriving="PartialEq"),
+ CGNonNamespacedEnum('ID', protos, [0], deriving="PartialEq"),
+ CGNonNamespacedEnum('Proxies', proxies, [0], deriving="PartialEq"),
])
@@ -5150,7 +5150,7 @@ class GlobalGenRoots():
return CGImports(code, [], [
'dom::bindings::codegen',
- 'dom::bindings::codegen::PrototypeList::proxies',
+ 'dom::bindings::codegen::PrototypeList::Proxies',
'js::jsapi::JSContext',
'js::jsapi::JSObject',
'libc',