From ad03037c82890e7ac496b96922552f465c45c0a7 Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Fri, 17 May 2019 15:52:31 +0200 Subject: [PATCH] Remove the Error IDL type It was added in 50e172ec, but it doesn't seem to ever have been used. --- index.bs | 86 +++----------------------------------------------------- 1 file changed, 4 insertions(+), 82 deletions(-) diff --git a/index.bs b/index.bs index 017a9d4e..1aaa0c62 100644 --- a/index.bs +++ b/index.bs @@ -4792,13 +4792,11 @@ listed in the [=error names table=] below. The table also indicates the {{DOMException}}'s integer code for that error name, if it has one. -There are two types that can be used to refer to exception objects: -{{DOMException}} and {{Error!!interface}}, -where the latter encompasses [=simple exceptions=] and {{DOMException}}. +There is one type that can be used to refer to exception objects: +{{DOMException}}. This allows for example an [=operation=] to be declared to have a {{DOMException}} -[=return type=] or an [=attribute=] -to be of type {{Error!!interface}}. +[=return type=]. [=Simple exceptions=] can be created by providing their [=error name=]. @@ -5332,7 +5330,7 @@ The string types are {{ByteString}} and {{USVString}}. The exception types are -{{Error!!interface}} and {{DOMException}}. +{{DOMException}}. The typed array types are {{Int8Array}}, @@ -5419,7 +5417,6 @@ type. "sequence" "<" TypeWithExtendedAttributes ">" Null "object" Null "symbol" Null - "Error" Null BufferRelatedType Null "FrozenArray" "<" TypeWithExtendedAttributes ">" Null RecordType Null @@ -6319,19 +6316,6 @@ type name of the original type with the set of strings corresponding to the [=id The [=type name=] for a type of the form [B, A] long? is "LongOrNullAB". -

Error

- -The {{Error!!interface}} type corresponds to the -set of all possible non-null references to exception objects, -including [=simple exceptions=] and {{DOMException}} objects. - -There is no way to represent a constant {{Error!!interface}} -value in IDL. - -The [=type name=] of the -{{Error!!interface}} type is "Error". - -

Buffer source types

There are a number of types that correspond to sets of all possible non-null @@ -7930,19 +7914,6 @@ that correspond to the union’s [=member types=]. [=implements=], then return the IDL value that is a reference to the object |V|. 1. If |types| includes {{object}}, then return the IDL value that is a reference to the object |V|. - 1. If |V| is a {{DOMException}} platform object, then: - 1. If |types| includes {{DOMException}} or - {{Error!!interface}}, then return the - result of [=converted to an IDL value|converting=] - |V| to that type. - 1. If |types| includes {{object}}, then return the IDL value - that is a reference to the object |V|. - 1. If Type(|V|) is Object and |V| has an \[[ErrorData]] [=internal slot=]), then: - 1. If |types| includes {{Error!!interface}}, then return the - result of [=converted to an IDL value|converting=] - |V| to {{Error!!interface}}. - 1. If |types| includes {{object}}, then return the IDL value - that is a reference to the object |V|. 1. If Type(|V|) is Object and |V| has an \[[ArrayBufferData]] [=internal slot=], then: 1. If |types| includes {{ArrayBuffer}}, then return the result of [=converted to an IDL value|converting=] @@ -8027,32 +7998,6 @@ that correspond to the union’s [=member types=].

-

Error

- -IDL {{Error!!interface}} values are represented -by native ECMAScript {{ECMAScript/Error}} objects and -by {{DOMException}} platform objects. - -
- - An ECMAScript value |V| is [=converted to an IDL value|converted=] - to an IDL {{Error!!interface}} value by running the following algorithm: - - 1. If Type(|V|) is not Object, - or |V| does not have an \[[ErrorData]] [=internal slot=], - then [=ECMAScript/throw=] a {{ECMAScript/TypeError}}. - 1. Return the IDL {{Error!!interface}} value that is a reference - to the same object as |V|. -
- -

- The result of [=converted to an ECMAScript value|converting=] - an IDL {{Error!!interface}} value to an ECMAScript - value is the {{ECMAScript/Error}} value that represents a reference to the same object that the - IDL {{Error!!interface}} represents. -

- -

DOMException

IDL {{DOMException}} values are represented by @@ -10374,29 +10319,6 @@ Note: The HTML Standard defines how a security check is performed. [[!HTML]] then remove from |S| all other entries. - 1. Otherwise: if |V| is a {{DOMException}} platform object and - there is an entry in |S| that has one of the following types at position |i| of its type list, - * {{DOMException}} - * {{Error!!interface}} - * {{object}} - * a [=nullable type|nullable=] version of either of the above types - * an [=annotated type=] whose [=annotated types/inner type=] is one of the above types - * a [=union type=], [=nullable type|nullable=] union type, or [=annotated type|annotated=] union type - that has one of the above types in its [=flattened member types=] - - then remove from |S| all other entries. - - 1. Otherwise: if Type(|V|) is Object, |V| has an \[[ErrorData]] [=internal slot=], and - there is an entry in |S| that has one of the following types at position |i| of its type list, - * {{Error!!interface}} - * {{object}} - * a [=nullable type|nullable=] version of either of the above types - * an [=annotated type=] whose [=annotated types/inner type=] is one of the above types - * a [=union type=], [=nullable type|nullable=] union type, or [=annotated type|annotated=] union type - that has one of the above types in its [=flattened member types=] - - then remove from |S| all other entries. - 1. Otherwise: if Type(|V|) is Object, |V| has an \[[ArrayBufferData]] [=internal slot=], and there is an entry in |S| that has one of the following types at position |i| of its type list, * {{ArrayBuffer}}