mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1132252. An interface with an interface object should not inherit from one that's [NoInterfaceObject]. r=smaug
This commit is contained in:
parent
dccefcef01
commit
11f1c43ca5
@ -687,12 +687,9 @@ def InterfaceObjectProtoGetter(descriptor):
|
||||
interface prototype as a JS::Handle<JSObject*> or None if no such
|
||||
function exists.
|
||||
"""
|
||||
parentWithInterfaceObject = descriptor.interface.parent
|
||||
while (parentWithInterfaceObject and
|
||||
not parentWithInterfaceObject.hasInterfaceObject()):
|
||||
parentWithInterfaceObject = parentWithInterfaceObject.parent
|
||||
if parentWithInterfaceObject:
|
||||
parentIfaceName = parentWithInterfaceObject.identifier.name
|
||||
parentInterface = descriptor.interface.parent
|
||||
if parentInterface:
|
||||
parentIfaceName = parentInterface.identifier.name
|
||||
parentDesc = descriptor.getDescriptor(parentIfaceName)
|
||||
prefix = toBindingNamespace(parentDesc.name)
|
||||
protoGetter = prefix + "::GetConstructorObject"
|
||||
|
@ -753,6 +753,17 @@ class IDLInterface(IDLObjectWithScope, IDLExposureMixins):
|
||||
self.parent.identifier.name),
|
||||
[self.location, self.parent.location])
|
||||
|
||||
# Interfaces which have interface objects can't inherit
|
||||
# from [NoInterfaceObject] interfaces.
|
||||
if (self.parent.getExtendedAttribute("NoInterfaceObject") and
|
||||
not self.getExtendedAttribute("NoInterfaceObject")):
|
||||
raise WebIDLError("Interface %s does not have "
|
||||
"[NoInterfaceObject] but inherits from "
|
||||
"interface %s which does" %
|
||||
(self.identifier.name,
|
||||
self.parent.identifier.name),
|
||||
[self.location, self.parent.location])
|
||||
|
||||
for iface in self.implementedInterfaces:
|
||||
iface.finish(scope)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user