diff options
author | Anthony Ramine <n.oxyde@gmail.com> | 2016-10-08 14:02:16 +0200 |
---|---|---|
committer | Anthony Ramine <n.oxyde@gmail.com> | 2016-10-11 14:50:58 +0200 |
commit | ea27f9d5ec580a9e743f89e92702df1d25b580ec (patch) | |
tree | 5ec15678ad1ce5cdfb0f581c47e11e99e3b12a39 /components/script/dom/bindings/codegen/CodegenRust.py | |
parent | f43a14ea687166da92bf23bdd61b546a74288d04 (diff) | |
download | servo-ea27f9d5ec580a9e743f89e92702df1d25b580ec.tar.gz servo-ea27f9d5ec580a9e743f89e92702df1d25b580ec.zip |
Introduce ServoParser
This is a common inline parent to ServoHTMLParser and ServoXMLParser.
Diffstat (limited to 'components/script/dom/bindings/codegen/CodegenRust.py')
-rw-r--r-- | components/script/dom/bindings/codegen/CodegenRust.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/components/script/dom/bindings/codegen/CodegenRust.py b/components/script/dom/bindings/codegen/CodegenRust.py index 24826ced714..d4c12f8c2ae 100644 --- a/components/script/dom/bindings/codegen/CodegenRust.py +++ b/components/script/dom/bindings/codegen/CodegenRust.py @@ -2748,7 +2748,8 @@ assert!((*cache)[PrototypeList::Constructor::%(id)s as usize].is_null()); interface.get()); """ % {"id": name, "name": str_to_const_array(name)}) - if len(self.descriptor.prototypeChain) == 1: + parentName = self.descriptor.getParentName() + if not parentName: if self.descriptor.interface.getExtendedAttribute("ExceptionClass"): getPrototypeProto = "prototype_proto.set(JS_GetErrorPrototype(cx))" elif self.descriptor.interface.isIteratorInterface(): @@ -2757,7 +2758,7 @@ assert!((*cache)[PrototypeList::Constructor::%(id)s as usize].is_null()); getPrototypeProto = "prototype_proto.set(JS_GetObjectPrototype(cx, global))" else: getPrototypeProto = ("%s::GetProtoObject(cx, global, prototype_proto.handle_mut())" % - toBindingNamespace(self.descriptor.getParentName())) + toBindingNamespace(parentName)) code = [CGGeneric("""\ rooted!(in(cx) let mut prototype_proto = ptr::null_mut()); |