diff options
author | Kagami Sascha Rosylight <saschanaz@outlook.com> | 2019-10-25 15:46:52 +0900 |
---|---|---|
committer | Kagami Sascha Rosylight <saschanaz@outlook.com> | 2019-10-29 21:35:40 +0900 |
commit | 691af0e98b95cb39a836319ecd10a35ce75b8db2 (patch) | |
tree | 8a25c0ae59bbab9b23016a259eabfc945c73b3a6 /components/script/dom/bindings/codegen/CodegenRust.py | |
parent | 97c01fc4792c6bc0edd2d588470f38a7f02d9661 (diff) | |
download | servo-691af0e98b95cb39a836319ecd10a35ce75b8db2.tar.gz servo-691af0e98b95cb39a836319ecd10a35ce75b8db2.zip |
Support stringifier attributes
Diffstat (limited to 'components/script/dom/bindings/codegen/CodegenRust.py')
-rw-r--r-- | components/script/dom/bindings/codegen/CodegenRust.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/components/script/dom/bindings/codegen/CodegenRust.py b/components/script/dom/bindings/codegen/CodegenRust.py index bb02119c406..86ee03d7ddd 100644 --- a/components/script/dom/bindings/codegen/CodegenRust.py +++ b/components/script/dom/bindings/codegen/CodegenRust.py @@ -3667,6 +3667,8 @@ class CGSpecializedMethod(CGAbstractExternMethod): @staticmethod def makeNativeName(descriptor, method): + if method.underlyingAttr: + return CGSpecializedGetter.makeNativeName(descriptor, method.underlyingAttr) name = method.identifier.name nativeName = descriptor.binaryNameFor(name) if nativeName == name: @@ -5762,7 +5764,7 @@ class CGInterfaceTrait(CGThing): for m in descriptor.interface.members: if (m.isMethod() and not m.isStatic() and not m.isMaplikeOrSetlikeOrIterableMethod() and - (not m.isIdentifierLess() or m.isStringifier()) and + (not m.isIdentifierLess() or (m.isStringifier() and not m.underlyingAttr)) and not m.isDefaultToJSON()): name = CGSpecializedMethod.makeNativeName(descriptor, m) infallible = 'infallible' in descriptor.getExtendedAttributes(m) @@ -6172,10 +6174,6 @@ class CGDescriptor(CGThing): cgThings.append(CGSpecializedMethod(descriptor, m)) cgThings.append(CGMemberJITInfo(descriptor, m)) elif m.isAttr(): - if m.stringifier: - raise TypeError("Stringifier attributes not supported yet. " - "See https://github.com/servo/servo/issues/7590\n" - "%s" % m.location) if m.getExtendedAttribute("Unscopable"): assert not m.isStatic() unscopableNames.append(m.identifier.name) |