mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Forbid unconditionally-exposed interfaces that inherit from conditionally-exposed ones.
This commit is contained in:
parent
91a78ed109
commit
f4c1529f56
1 changed files with 6 additions and 0 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue