Bug 1456887 part 2. Remove ArrayClass support. r=qdot
authorBoris Zbarsky <bzbarsky@mit.edu>
Thu, 26 Apr 2018 01:38:07 -0400
changeset 469270 1692850c1b87be1829271a379a47ac9433777eaf
parent 469269 388cb76398c036775e92f9809926db2dbf46e784
child 469271 e515ebef17d05afdc91fe1e95981bc9500caffbd
push id9165
push userasasaki@mozilla.com
push dateThu, 26 Apr 2018 21:04:54 +0000
treeherdermozilla-beta@064c3804de2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersqdot
bugs1456887
milestone61.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1456887 part 2. Remove ArrayClass support. r=qdot
dom/bindings/Codegen.py
dom/bindings/parser/WebIDL.py
dom/bindings/parser/tests/test_interface.py
--- a/dom/bindings/Codegen.py
+++ b/dom/bindings/Codegen.py
@@ -618,19 +618,17 @@ def InterfacePrototypeObjectProtoGetter(
            interface prototype object as a JS::Handle<JSObject*> or None if no
            such function exists.
     """
     parentProtoName = descriptor.parentPrototypeName
     if descriptor.hasNamedPropertiesObject:
         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"
         else:
             protoGetter = "JS::GetRealmObjectPrototype"
         protoHandleGetter = None
     else:
         prefix = toBindingNamespace(parentProtoName)
--- a/dom/bindings/parser/WebIDL.py
+++ b/dom/bindings/parser/WebIDL.py
@@ -1678,24 +1678,16 @@ class IDLInterface(IDLInterfaceOrNamespa
                     # whether the result is actually one of our existing
                     # NamedConstructors.
                     newMethod = self.parentScope.lookupIdentifier(method.identifier)
                     if newMethod == method:
                         self.namedConstructors.append(method)
                     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",
                                       [attr.location])
                 if self.parent:
                     raise WebIDLError("[ExceptionClass] must not be specified on "
                                       "an interface with inherited interfaces",
                                       [attr.location, self.location])
--- a/dom/bindings/parser/tests/test_interface.py
+++ b/dom/bindings/parser/tests/test_interface.py
@@ -369,37 +369,8 @@ def WebIDLTest(parser, harness):
                 readonly attribute boolean y;
             };
         """)
         results = parser.finish()
     except:
         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")