aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings/codegen
diff options
context:
space:
mode:
authorbors-servo <metajack+bors@gmail.com>2015-01-02 09:22:51 -0700
committerbors-servo <metajack+bors@gmail.com>2015-01-02 09:22:51 -0700
commit141b5d038fad3c0c44a6f1b309b8ca9edea54580 (patch)
treed8f7fbbcba47b42eb2e0cc162605620bbc6f7a23 /components/script/dom/bindings/codegen
parenta61417e2a87004e30e2a02f2e6ae58629062e3d5 (diff)
parent203d1669c8ce98468c7935ead8f0ef4c803dd5a0 (diff)
downloadservo-141b5d038fad3c0c44a6f1b309b8ca9edea54580.tar.gz
servo-141b5d038fad3c0c44a6f1b309b8ca9edea54580.zip
auto merge of #4526 : servo/servo/deref-1, r=Manishearth
This is a start towards fixing #3868. Not all callers have been fixed yet, so the `Deref` implementation remains for now.
Diffstat (limited to 'components/script/dom/bindings/codegen')
-rw-r--r--components/script/dom/bindings/codegen/CodegenRust.py12
-rw-r--r--components/script/dom/bindings/codegen/Configuration.py2
2 files changed, 7 insertions, 7 deletions
diff --git a/components/script/dom/bindings/codegen/CodegenRust.py b/components/script/dom/bindings/codegen/CodegenRust.py
index f59517a0b23..dc9beb97ed4 100644
--- a/components/script/dom/bindings/codegen/CodegenRust.py
+++ b/components/script/dom/bindings/codegen/CodegenRust.py
@@ -2199,7 +2199,7 @@ class CGCallGenerator(CGThing):
if static:
call = CGWrapper(call, pre="%s::" % descriptorProvider.interface.identifier.name)
else:
- call = CGWrapper(call, pre="%s." % object)
+ call = CGWrapper(call, pre="%s.r()." % object)
call = CGList([call, CGWrapper(args, pre="(", post=")")])
self.cgRoot.append(CGList([
@@ -2214,7 +2214,7 @@ class CGCallGenerator(CGThing):
if static:
glob = ""
else:
- glob = " let global = global_object_for_js_object(this.reflector().get_jsobject());\n"\
+ glob = " let global = global_object_for_js_object(this.r().reflector().get_jsobject());\n"\
" let global = global.root();\n"
self.cgRoot.append(CGGeneric(
@@ -2222,7 +2222,7 @@ class CGCallGenerator(CGThing):
" Ok(result) => result,\n"
" Err(e) => {\n"
"%s"
- " throw_dom_exception(cx, global.root_ref(), e);\n"
+ " throw_dom_exception(cx, global.r(), e);\n"
" return%s;\n"
" },\n"
"};" % (glob, errorResult)))
@@ -2307,7 +2307,7 @@ class CGPerSignatureCall(CGThing):
def process(arg, i):
argVal = "arg" + str(i)
if arg.type.isGeckoInterface() and not arg.type.unroll().inner.isCallback():
- argVal += ".root_ref()"
+ argVal += ".r()"
return argVal
return [(a, process(a, i)) for (i, a) in enumerate(self.arguments)]
@@ -3540,7 +3540,7 @@ class CGProxySpecialOperation(CGPerSignatureCall):
def process(arg):
argVal = arg.identifier.name
if arg.type.isGeckoInterface() and not arg.type.unroll().inner.isCallback():
- argVal += ".root_ref()"
+ argVal += ".r()"
return argVal
args = [(a, process(a)) for a in self.arguments]
if self.idlNode.isGetter():
@@ -4014,7 +4014,7 @@ let global = global_object_for_js_object(JS_CALLEE(cx, vp).to_object());
let global = global.root();
""")
nativeName = MakeNativeName(self._ctor.identifier.name)
- callGenerator = CGMethodCall(["&global.root_ref()"], nativeName, True,
+ callGenerator = CGMethodCall(["&global.r()"], nativeName, True,
self.descriptor, self._ctor)
return CGList([preamble, callGenerator])
diff --git a/components/script/dom/bindings/codegen/Configuration.py b/components/script/dom/bindings/codegen/Configuration.py
index be3ff10ab68..ac103c86378 100644
--- a/components/script/dom/bindings/codegen/Configuration.py
+++ b/components/script/dom/bindings/codegen/Configuration.py
@@ -156,7 +156,7 @@ class Descriptor(DescriptorProvider):
self.needsRooting = True
self.returnType = "Temporary<%s>" % ifaceName
self.argumentType = "JSRef<%s>" % ifaceName
- self.memberType = "Root<'a, 'b, %s>" % ifaceName
+ self.memberType = "Root<%s>" % ifaceName
self.nativeType = "JS<%s>" % ifaceName
self.concreteType = ifaceName