mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-27 04:38:02 +00:00
Bug 1456887 part 2. Remove ArrayClass support. r=qdot
This commit is contained in:
parent
db41f3a815
commit
6072982c14
@ -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"
|
||||
|
@ -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",
|
||||
|
@ -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")
|
||||
|
Loading…
x
Reference in New Issue
Block a user