aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings/codegen
diff options
context:
space:
mode:
authorMs2ger <ms2ger@gmail.com>2015-01-30 16:10:45 +0100
committerMs2ger <ms2ger@gmail.com>2015-01-30 16:10:45 +0100
commitf5412355b1c350270552378b19199882c0dd1f68 (patch)
treefbe15539eaa3475932010d3897e402faae32094c /components/script/dom/bindings/codegen
parent10ce1c8df55b6621a13d3bd4864052a9a6e0b665 (diff)
downloadservo-f5412355b1c350270552378b19199882c0dd1f68.tar.gz
servo-f5412355b1c350270552378b19199882c0dd1f68.zip
Use snake case for arguments and locals in CGGetPerInterfaceObject.
Diffstat (limited to 'components/script/dom/bindings/codegen')
-rw-r--r--components/script/dom/bindings/codegen/CodegenRust.py24
1 files changed, 12 insertions, 12 deletions
diff --git a/components/script/dom/bindings/codegen/CodegenRust.py b/components/script/dom/bindings/codegen/CodegenRust.py
index 07b45737008..795204466df 100644
--- a/components/script/dom/bindings/codegen/CodegenRust.py
+++ b/components/script/dom/bindings/codegen/CodegenRust.py
@@ -2017,32 +2017,32 @@ class CGGetPerInterfaceObject(CGAbstractMethod):
constructor object).
"""
def __init__(self, descriptor, name, idPrefix="", pub=False):
- args = [Argument('*mut JSContext', 'aCx'), Argument('*mut JSObject', 'aGlobal'),
- Argument('*mut JSObject', 'aReceiver')]
+ args = [Argument('*mut JSContext', 'cx'), Argument('*mut JSObject', 'global'),
+ Argument('*mut JSObject', 'receiver')]
CGAbstractMethod.__init__(self, descriptor, name,
'*mut JSObject', args, pub=pub)
self.id = idPrefix + "ID::" + self.descriptor.name
def definition_body(self):
return CGGeneric("""
-/* aGlobal and aReceiver are usually the same, but they can be different
+/* global and receiver are usually the same, but they can be different
too. For example a sandbox often has an xray wrapper for a window as the
- prototype of the sandbox's global. In that case aReceiver is the xray
- wrapper and aGlobal is the sandbox's global.
+ prototype of the sandbox's global. In that case receiver is the xray
+ wrapper and global is the sandbox's global.
*/
-assert!(((*JS_GetClass(aGlobal)).flags & JSCLASS_DOM_GLOBAL) != 0);
+assert!(((*JS_GetClass(global)).flags & JSCLASS_DOM_GLOBAL) != 0);
/* Check to see whether the interface objects are already installed */
-let protoOrIfaceArray = get_proto_or_iface_array(aGlobal);
-let cachedObject: *mut JSObject = *protoOrIfaceArray.offset(%s as int);
-if cachedObject.is_null() {
- let tmp: *mut JSObject = CreateInterfaceObjects(aCx, aGlobal, aReceiver);
+let proto_or_iface_array = get_proto_or_iface_array(global);
+let cached_object: *mut JSObject = *proto_or_iface_array.offset(%s as int);
+if cached_object.is_null() {
+ let tmp: *mut JSObject = CreateInterfaceObjects(cx, global, receiver);
assert!(!tmp.is_null());
- *protoOrIfaceArray.offset(%s as int) = tmp;
+ *proto_or_iface_array.offset(%s as int) = tmp;
tmp
} else {
- cachedObject
+ cached_object
}""" % (self.id, self.id))
class CGGetProtoObjectMethod(CGGetPerInterfaceObject):