diff --git a/dom/bindings/parser/WebIDL.py b/dom/bindings/parser/WebIDL.py index f568aad64287..085129f277f7 100644 --- a/dom/bindings/parser/WebIDL.py +++ b/dom/bindings/parser/WebIDL.py @@ -1330,7 +1330,7 @@ class IDLInterfaceOrNamespace(IDLObjectWithScope, IDLExposureMixins): if not indexedGetter: raise WebIDLError("Interface with value iterator does not " "support indexed properties", - [self.location, iterableDecl.location]) + [self.location]) if iterableDecl.valueType != indexedGetter.signatures()[0][0]: raise WebIDLError("Iterable type does not match indexed " @@ -1341,7 +1341,7 @@ class IDLInterfaceOrNamespace(IDLObjectWithScope, IDLExposureMixins): if not hasLengthAttribute: raise WebIDLError('Interface with value iterator does not ' 'have an integer-typed "length" attribute', - [self.location, iterableDecl.location]) + [self.location]) else: assert iterableDecl.isPairIterator() if indexedGetter: @@ -1350,11 +1350,6 @@ class IDLInterfaceOrNamespace(IDLObjectWithScope, IDLExposureMixins): [self.location, iterableDecl.location, indexedGetter.location]) - if indexedGetter and not hasLengthAttribute: - raise WebIDLError('Interface with an indexed getter does not have ' - 'an integer-typed "length" attribute', - [self.location, indexedGetter.location]) - def isExternal(self): return False diff --git a/dom/bindings/test/TestCodeGen.webidl b/dom/bindings/test/TestCodeGen.webidl index ded1c097c308..1511a6e55fba 100644 --- a/dom/bindings/test/TestCodeGen.webidl +++ b/dom/bindings/test/TestCodeGen.webidl @@ -1180,7 +1180,6 @@ interface TestIndexedGetterAndSetterAndNamedGetterInterface { getter DOMString (DOMString myName); getter long (unsigned long index); setter creator void (unsigned long index, long arg); - readonly attribute unsigned long length; }; interface TestIndexedAndNamedGetterInterface { @@ -1192,7 +1191,6 @@ interface TestIndexedAndNamedGetterInterface { interface TestIndexedSetterInterface { setter creator void setItem(unsigned long idx, DOMString item); getter DOMString (unsigned long idx); - readonly attribute unsigned long length; }; interface TestNamedSetterInterface { @@ -1203,7 +1201,6 @@ interface TestNamedSetterInterface { interface TestIndexedAndNamedSetterInterface { setter creator void (unsigned long index, TestIndexedSetterInterface item); getter TestIndexedSetterInterface (unsigned long index); - readonly attribute unsigned long length; setter creator void setNamedItem(DOMString name, TestIndexedSetterInterface item); getter TestIndexedSetterInterface (DOMString name); }; diff --git a/dom/bindings/test/TestExampleGen.webidl b/dom/bindings/test/TestExampleGen.webidl index 2ebbb16d5fe9..03a39f2007d6 100644 --- a/dom/bindings/test/TestExampleGen.webidl +++ b/dom/bindings/test/TestExampleGen.webidl @@ -434,7 +434,6 @@ interface TestExampleInterface { void passUnion((object or long) arg); // Some union tests are debug-only to avoid creating all those // unused union types in opt builds. - #ifdef DEBUG void passUnion2((long or boolean) arg); void passUnion3((object or long or boolean) arg); @@ -804,7 +803,6 @@ interface TestExampleInterface { interface TestExampleProxyInterface { getter long longIndexedGetter(unsigned long ix); setter creator void longIndexedSetter(unsigned long y, long z); - readonly attribute unsigned long length; stringifier DOMString myStringifier(); getter short shortNameGetter(DOMString nom); deleter void (DOMString nomnom); diff --git a/dom/webidl/OfflineResourceList.webidl b/dom/webidl/OfflineResourceList.webidl index abdf562c73ce..abc5118881dd 100644 --- a/dom/webidl/OfflineResourceList.webidl +++ b/dom/webidl/OfflineResourceList.webidl @@ -93,12 +93,6 @@ partial interface OfflineResourceList { [Throws] getter DOMString mozItem(unsigned long index); - /** - * We need a "length" to actually be valid Web IDL, given that we have an - * indexed getter. - */ - readonly attribute unsigned long length; - /** * Add an item to the list of dynamically-managed entries. The resource * will be fetched into the application cache.