diff options
author | Josh Matthews <josh@joshmatthews.net> | 2016-03-23 17:11:14 -0400 |
---|---|---|
committer | Josh Matthews <josh@joshmatthews.net> | 2016-05-02 14:32:53 -0400 |
commit | f4c1529f56d158953fb8b8826fcb98995636c9f6 (patch) | |
tree | 61801ebd2f3730c52ad544cafffb875520f1b8aa /components/script/dom/bindings/codegen/Configuration.py | |
parent | 91a78ed109c35207fd8622f837aff9a927859427 (diff) | |
download | servo-f4c1529f56d158953fb8b8826fcb98995636c9f6.tar.gz servo-f4c1529f56d158953fb8b8826fcb98995636c9f6.zip |
Forbid unconditionally-exposed interfaces that inherit from conditionally-exposed ones.
Diffstat (limited to 'components/script/dom/bindings/codegen/Configuration.py')
-rw-r--r-- | components/script/dom/bindings/codegen/Configuration.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/components/script/dom/bindings/codegen/Configuration.py b/components/script/dom/bindings/codegen/Configuration.py index 9a1c5e2f4df..3ee7fb37e77 100644 --- a/components/script/dom/bindings/codegen/Configuration.py +++ b/components/script/dom/bindings/codegen/Configuration.py @@ -165,6 +165,12 @@ class Descriptor(DescriptorProvider): DescriptorProvider.__init__(self, config) self.interface = interface + if not self.isExposedConditionally(): + if interface.parent and interface.parent.isExposedConditionally(): + raise TypeError("%s is not conditionally exposed but inherits from " + "%s which is" % + (interface.identifier.name, interface.parent.identifier.name)) + # Read the desc, and fill in the relevant defaults. ifaceName = self.interface.identifier.name |