aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings/codegen/CodegenRust.py
diff options
context:
space:
mode:
authorbors-servo <metajack+bors@gmail.com>2015-04-30 04:33:32 -0500
committerbors-servo <metajack+bors@gmail.com>2015-04-30 04:33:32 -0500
commit2c177794408bfbb5f8d6042f38639a5cba5eb2e5 (patch)
treee90ad3e959139c85036faada722c74bcdf7c7bb2 /components/script/dom/bindings/codegen/CodegenRust.py
parent738f006afe36a06c8ed4f668904c76ba84e9f1af (diff)
parent3b82cba0112020979d51333b06e91b7c2c6c6bc1 (diff)
downloadservo-2c177794408bfbb5f8d6042f38639a5cba5eb2e5.tar.gz
servo-2c177794408bfbb5f8d6042f38639a5cba5eb2e5.zip
Auto merge of #5896 - nox:stringifier-proxy, r=jdm
The proxy stringifiers called through {}.toString.call() (obj_toString) shouldn't use the stringifier. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5896) <!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom/bindings/codegen/CodegenRust.py')
-rw-r--r--components/script/dom/bindings/codegen/CodegenRust.py21
1 files changed, 1 insertions, 20 deletions
diff --git a/components/script/dom/bindings/codegen/CodegenRust.py b/components/script/dom/bindings/codegen/CodegenRust.py
index b63df28d349..d48db291dd4 100644
--- a/components/script/dom/bindings/codegen/CodegenRust.py
+++ b/components/script/dom/bindings/codegen/CodegenRust.py
@@ -4106,25 +4106,6 @@ class CGDOMJSProxyHandler_obj_toString(CGAbstractExternMethod):
CGAbstractExternMethod.__init__(self, descriptor, "obj_toString", "*mut JSString", args)
self.descriptor = descriptor
def getBody(self):
- stringifier = self.descriptor.operations['Stringifier']
- if stringifier:
- name = self.descriptor.binaryNameFor(stringifier.identifier.name)
- nativeName = MakeNativeName(name)
- signature = stringifier.signatures()[0]
- returnType = signature[0]
- extendedAttributes = self.descriptor.getExtendedAttributes(stringifier)
- infallible = 'infallible' in extendedAttributes
- if not infallible:
- error = CGGeneric(
- ('ThrowMethodFailedWithDetails(cx, rv, "%s", "toString");\n' +
- "return NULL;") % self.descriptor.interface.identifier.name)
- else:
- error = None
- call = CGCallGenerator(error, [], "", returnType, extendedAttributes, self.descriptor, nativeName, False, object="UnwrapProxy(proxy)")
- return call.define() + """\
-JSString* jsresult;
-return xpc_qsStringToJsstring(cx, result, &jsresult) ? jsresult : NULL;"""
-
return """proxyhandler::object_to_string(cx, "%s")""" % self.descriptor.name
def definition_body(self):
@@ -4264,7 +4245,7 @@ class CGInterfaceTrait(CGThing):
if descriptor.proxy:
for name, operation in descriptor.operations.iteritems():
- if not operation:
+ if not operation or operation.isStringifier():
continue
assert len(operation.signatures()) == 1