Bug 1456887 part 2. Remove ArrayClass support. r=qdot

This commit is contained in:
Boris Zbarsky 2018-04-26 01:38:07 -04:00
parent db41f3a815
commit 6072982c14
3 changed files with 1 additions and 40 deletions

View File

@ -623,9 +623,7 @@ def InterfacePrototypeObjectProtoGetter(descriptor):
protoGetter = "GetNamedPropertiesObject"
protoHandleGetter = None
elif parentProtoName is None:
if descriptor.interface.getExtendedAttribute("ArrayClass"):
protoGetter = "JS::GetRealmArrayPrototype"
elif descriptor.interface.getExtendedAttribute("ExceptionClass"):
if descriptor.interface.getExtendedAttribute("ExceptionClass"):
protoGetter = "JS::GetRealmErrorPrototype"
elif descriptor.interface.isIteratorInterface():
protoGetter = "JS::GetRealmIteratorPrototype"

View File

@ -1683,14 +1683,6 @@ class IDLInterface(IDLInterfaceOrNamespace):
elif newMethod not in self.namedConstructors:
raise WebIDLError("NamedConstructor conflicts with a NamedConstructor of a different interface",
[method.location, newMethod.location])
elif (identifier == "ArrayClass"):
if not attr.noArguments():
raise WebIDLError("[ArrayClass] must take no arguments",
[attr.location])
if self.parent:
raise WebIDLError("[ArrayClass] must not be specified on "
"an interface with inherited interfaces",
[attr.location, self.location])
elif (identifier == "ExceptionClass"):
if not attr.noArguments():
raise WebIDLError("[ExceptionClass] must take no arguments",

View File

@ -374,32 +374,3 @@ def WebIDLTest(parser, harness):
threw = True
harness.ok(threw,
"Should not allow unknown extended attributes on interfaces")
parser = parser.reset()
threw = False
try:
parser.parse("""
interface B {};
[ArrayClass]
interface A : B {
};
""")
results = parser.finish()
except:
threw = True
harness.ok(threw,
"Should not allow [ArrayClass] on interfaces with parents")
parser = parser.reset()
threw = False
try:
parser.parse("""
[ArrayClass]
interface A {
};
""")
results = parser.finish()
except:
threw = True
harness.ok(not threw,
"Should allow [ArrayClass] on interfaces without parents")