Bug 778150 part 2. Default methods to infallible. Allow annotation of fallible methods in WebIDL using [Throws]. r=peterv

[Throws] can either take no value, or can take MainThread or Workers if the
throwing behavior is only happening on main thread or in workers.
This commit is contained in:
Boris Zbarsky 2012-09-05 09:21:33 -04:00
parent 2b85439c92
commit a17389cd6f
11 changed files with 354 additions and 473 deletions

View File

@ -2978,8 +2978,11 @@ class CGPerSignatureCall(CGThing):
isCreator = memberIsCreator(self.idlNode) isCreator = memberIsCreator(self.idlNode)
if isCreator: if isCreator:
# We better be returning addrefed things! # We better be returning addrefed things!
assert isResultAlreadyAddRefed(self.descriptor, assert(isResultAlreadyAddRefed(self.descriptor,
self.extendedAttributes) self.extendedAttributes) or
# Workers use raw pointers for new-object return
# values or something
self.descriptor.workers)
resultTemplateValues = { 'jsvalRef': '*vp', 'jsvalPtr': 'vp', resultTemplateValues = { 'jsvalRef': '*vp', 'jsvalPtr': 'vp',
'isCreator': isCreator} 'isCreator': isCreator}

View File

@ -290,21 +290,21 @@ class Descriptor(DescriptorProvider):
return self.interface.hasInterfaceObject() or self.interface.hasInterfacePrototypeObject() return self.interface.hasInterfaceObject() or self.interface.hasInterfacePrototypeObject()
def getExtendedAttributes(self, member, getter=False, setter=False): def getExtendedAttributes(self, member, getter=False, setter=False):
def ensureValidInfallibleExtendedAttribute(attr): def ensureValidInfallibilityExtendedAttribute(name, attr):
assert(attr is None or attr is True or len(attr) == 1) assert(attr is None or attr is True or len(attr) == 1)
if (attr is not None and attr is not True and if (attr is not None and attr is not True and
'Workers' not in attr and 'MainThread' not in attr): 'Workers' not in attr and 'MainThread' not in attr):
raise TypeError("Unknown value for 'infallible': " + attr[0]) raise TypeError(("Unknown value for '%s': " % name) + attr[0])
name = member.identifier.name name = member.identifier.name
if member.isMethod(): if member.isMethod():
attrs = self.extendedAttributes['all'].get(name, []) attrs = self.extendedAttributes['all'].get(name, [])
infallible = member.getExtendedAttribute("Infallible") throws = member.getExtendedAttribute("Throws")
ensureValidInfallibleExtendedAttribute(infallible) ensureValidInfallibilityExtendedAttribute("Throws", throws)
if (infallible is not None and if (throws is None or
(infallible is True or (throws is not True and
('Workers' in infallible and self.workers) or ('Workers' not in throws or not self.workers) and
('MainThread' in infallible and not self.workers))): ('MainThread' not in throws or self.workers))):
attrs.append("infallible") attrs.append("infallible")
return attrs return attrs
@ -317,7 +317,7 @@ class Descriptor(DescriptorProvider):
infallibleAttr = "GetterInfallible" if getter else "SetterInfallible" infallibleAttr = "GetterInfallible" if getter else "SetterInfallible"
infallible = member.getExtendedAttribute(infallibleAttr) infallible = member.getExtendedAttribute(infallibleAttr)
ensureValidInfallibleExtendedAttribute(infallible) ensureValidInfallibilityExtendedAttribute("Infallible", infallible)
if (infallible is not None and if (infallible is not None and
(infallible is True or (infallible is True or
('Workers' in infallible and self.workers) or ('Workers' in infallible and self.workers) or

View File

@ -676,9 +676,11 @@ class IDLInterface(IDLObjectWithScope):
allowForbidden=True) allowForbidden=True)
method = IDLMethod(self.location, identifier, retType, args) method = IDLMethod(self.location, identifier, retType, args)
# Constructors are always Creators and never have any # Constructors are always Creators and are always
# other extended attributes. # assumed to be able to throw (since there's no way to
method.addExtendedAttributes(["Creator"]) # indicate otherwise) and never have any other
# extended attributes.
method.addExtendedAttributes([("Creator",), ("Throws",)])
method.resolve(self) method.resolve(self)
self._extendedAttrDict[identifier] = attrlist if len(attrlist) else True self._extendedAttrDict[identifier] = attrlist if len(attrlist) else True

View File

@ -52,7 +52,7 @@ public:
bool GetIndirectlyImplementedProperty(ErrorResult&); bool GetIndirectlyImplementedProperty(ErrorResult&);
void SetIndirectlyImplementedProperty(bool, ErrorResult&); void SetIndirectlyImplementedProperty(bool, ErrorResult&);
void IndirectlyImplementedMethod(ErrorResult&); void IndirectlyImplementedMethod();
}; };
// IID for the TestExternalInterface // IID for the TestExternalInterface
@ -131,254 +131,232 @@ public:
int8_t GetReadonlyByte(ErrorResult&); int8_t GetReadonlyByte(ErrorResult&);
int8_t GetWritableByte(ErrorResult&); int8_t GetWritableByte(ErrorResult&);
void SetWritableByte(int8_t, ErrorResult&); void SetWritableByte(int8_t, ErrorResult&);
void PassByte(int8_t, ErrorResult&); void PassByte(int8_t);
int8_t ReceiveByte(ErrorResult&); int8_t ReceiveByte();
void PassOptionalByte(const Optional<int8_t>&, ErrorResult&); void PassOptionalByte(const Optional<int8_t>&);
void PassOptionalByteWithDefault(int8_t, ErrorResult&); void PassOptionalByteWithDefault(int8_t);
void PassNullableByte(Nullable<int8_t>&, ErrorResult&); void PassNullableByte(Nullable<int8_t>&);
void PassOptionalNullableByte(const Optional< Nullable<int8_t> >&, void PassOptionalNullableByte(const Optional< Nullable<int8_t> >&);
ErrorResult&);
int16_t GetReadonlyShort(ErrorResult&); int16_t GetReadonlyShort(ErrorResult&);
int16_t GetWritableShort(ErrorResult&); int16_t GetWritableShort(ErrorResult&);
void SetWritableShort(int16_t, ErrorResult&); void SetWritableShort(int16_t, ErrorResult&);
void PassShort(int16_t, ErrorResult&); void PassShort(int16_t);
int16_t ReceiveShort(ErrorResult&); int16_t ReceiveShort();
void PassOptionalShort(const Optional<int16_t>&, ErrorResult&); void PassOptionalShort(const Optional<int16_t>&);
void PassOptionalShortWithDefault(int16_t, ErrorResult&); void PassOptionalShortWithDefault(int16_t);
int32_t GetReadonlyLong(ErrorResult&); int32_t GetReadonlyLong(ErrorResult&);
int32_t GetWritableLong(ErrorResult&); int32_t GetWritableLong(ErrorResult&);
void SetWritableLong(int32_t, ErrorResult&); void SetWritableLong(int32_t, ErrorResult&);
void PassLong(int32_t, ErrorResult&); void PassLong(int32_t);
int16_t ReceiveLong(ErrorResult&); int16_t ReceiveLong();
void PassOptionalLong(const Optional<int32_t>&, ErrorResult&); void PassOptionalLong(const Optional<int32_t>&);
void PassOptionalLongWithDefault(int32_t, ErrorResult&); void PassOptionalLongWithDefault(int32_t);
int64_t GetReadonlyLongLong(ErrorResult&); int64_t GetReadonlyLongLong(ErrorResult&);
int64_t GetWritableLongLong(ErrorResult&); int64_t GetWritableLongLong(ErrorResult&);
void SetWritableLongLong(int64_t, ErrorResult&); void SetWritableLongLong(int64_t, ErrorResult&);
void PassLongLong(int64_t, ErrorResult&); void PassLongLong(int64_t);
int64_t ReceiveLongLong(ErrorResult&); int64_t ReceiveLongLong();
void PassOptionalLongLong(const Optional<int64_t>&, ErrorResult&); void PassOptionalLongLong(const Optional<int64_t>&);
void PassOptionalLongLongWithDefault(int64_t, ErrorResult&); void PassOptionalLongLongWithDefault(int64_t);
uint8_t GetReadonlyOctet(ErrorResult&); uint8_t GetReadonlyOctet(ErrorResult&);
uint8_t GetWritableOctet(ErrorResult&); uint8_t GetWritableOctet(ErrorResult&);
void SetWritableOctet(uint8_t, ErrorResult&); void SetWritableOctet(uint8_t, ErrorResult&);
void PassOctet(uint8_t, ErrorResult&); void PassOctet(uint8_t);
uint8_t ReceiveOctet(ErrorResult&); uint8_t ReceiveOctet();
void PassOptionalOctet(const Optional<uint8_t>&, ErrorResult&); void PassOptionalOctet(const Optional<uint8_t>&);
void PassOptionalOctetWithDefault(uint8_t, ErrorResult&); void PassOptionalOctetWithDefault(uint8_t);
uint16_t GetReadonlyUnsignedShort(ErrorResult&); uint16_t GetReadonlyUnsignedShort(ErrorResult&);
uint16_t GetWritableUnsignedShort(ErrorResult&); uint16_t GetWritableUnsignedShort(ErrorResult&);
void SetWritableUnsignedShort(uint16_t, ErrorResult&); void SetWritableUnsignedShort(uint16_t, ErrorResult&);
void PassUnsignedShort(uint16_t, ErrorResult&); void PassUnsignedShort(uint16_t);
uint16_t ReceiveUnsignedShort(ErrorResult&); uint16_t ReceiveUnsignedShort();
void PassOptionalUnsignedShort(const Optional<uint16_t>&, ErrorResult&); void PassOptionalUnsignedShort(const Optional<uint16_t>&);
void PassOptionalUnsignedShortWithDefault(uint16_t, ErrorResult&); void PassOptionalUnsignedShortWithDefault(uint16_t);
uint32_t GetReadonlyUnsignedLong(ErrorResult&); uint32_t GetReadonlyUnsignedLong(ErrorResult&);
uint32_t GetWritableUnsignedLong(ErrorResult&); uint32_t GetWritableUnsignedLong(ErrorResult&);
void SetWritableUnsignedLong(uint32_t, ErrorResult&); void SetWritableUnsignedLong(uint32_t, ErrorResult&);
void PassUnsignedLong(uint32_t, ErrorResult&); void PassUnsignedLong(uint32_t);
uint32_t ReceiveUnsignedLong(ErrorResult&); uint32_t ReceiveUnsignedLong();
void PassOptionalUnsignedLong(const Optional<uint32_t>&, ErrorResult&); void PassOptionalUnsignedLong(const Optional<uint32_t>&);
void PassOptionalUnsignedLongWithDefault(uint32_t, ErrorResult&); void PassOptionalUnsignedLongWithDefault(uint32_t);
uint64_t GetReadonlyUnsignedLongLong(ErrorResult&); uint64_t GetReadonlyUnsignedLongLong(ErrorResult&);
uint64_t GetWritableUnsignedLongLong(ErrorResult&); uint64_t GetWritableUnsignedLongLong(ErrorResult&);
void SetWritableUnsignedLongLong(uint64_t, ErrorResult&); void SetWritableUnsignedLongLong(uint64_t, ErrorResult&);
void PassUnsignedLongLong(uint64_t, ErrorResult&); void PassUnsignedLongLong(uint64_t);
uint64_t ReceiveUnsignedLongLong(ErrorResult&); uint64_t ReceiveUnsignedLongLong();
void PassOptionalUnsignedLongLong(const Optional<uint64_t>&, ErrorResult&); void PassOptionalUnsignedLongLong(const Optional<uint64_t>&);
void PassOptionalUnsignedLongLongWithDefault(uint64_t, ErrorResult&); void PassOptionalUnsignedLongLongWithDefault(uint64_t);
// Interface types // Interface types
already_AddRefed<TestInterface> ReceiveSelf(ErrorResult&); already_AddRefed<TestInterface> ReceiveSelf();
already_AddRefed<TestInterface> ReceiveNullableSelf(ErrorResult&); already_AddRefed<TestInterface> ReceiveNullableSelf();
TestInterface* ReceiveWeakSelf(ErrorResult&); TestInterface* ReceiveWeakSelf();
TestInterface* ReceiveWeakNullableSelf(ErrorResult&); TestInterface* ReceiveWeakNullableSelf();
void PassSelf(TestInterface&, ErrorResult&); void PassSelf(TestInterface&);
void PassSelf2(NonNull<TestInterface>&, ErrorResult&); void PassSelf2(NonNull<TestInterface>&);
void PassNullableSelf(TestInterface*, ErrorResult&); void PassNullableSelf(TestInterface*);
already_AddRefed<TestInterface> GetNonNullSelf(ErrorResult&); already_AddRefed<TestInterface> GetNonNullSelf(ErrorResult&);
void SetNonNullSelf(TestInterface&, ErrorResult&); void SetNonNullSelf(TestInterface&, ErrorResult&);
already_AddRefed<TestInterface> GetNullableSelf(ErrorResult&); already_AddRefed<TestInterface> GetNullableSelf(ErrorResult&);
void SetNullableSelf(TestInterface*, ErrorResult&); void SetNullableSelf(TestInterface*, ErrorResult&);
void PassOptionalSelf(const Optional<TestInterface*> &, ErrorResult&); void PassOptionalSelf(const Optional<TestInterface*> &);
void PassOptionalNonNullSelf(const Optional<NonNull<TestInterface> >&, ErrorResult&); void PassOptionalNonNullSelf(const Optional<NonNull<TestInterface> >&);
void PassOptionalSelfWithDefault(TestInterface*, ErrorResult&); void PassOptionalSelfWithDefault(TestInterface*);
already_AddRefed<TestNonWrapperCacheInterface> ReceiveNonWrapperCacheInterface(ErrorResult&); already_AddRefed<TestNonWrapperCacheInterface> ReceiveNonWrapperCacheInterface();
already_AddRefed<TestNonWrapperCacheInterface> ReceiveNullableNonWrapperCacheInterface(ErrorResult&); already_AddRefed<TestNonWrapperCacheInterface> ReceiveNullableNonWrapperCacheInterface();
void ReceiveNonWrapperCacheInterfaceSequence(nsTArray<nsRefPtr<TestNonWrapperCacheInterface> >&, ErrorResult&); void ReceiveNonWrapperCacheInterfaceSequence(nsTArray<nsRefPtr<TestNonWrapperCacheInterface> >&);
void ReceiveNullableNonWrapperCacheInterfaceSequence(nsTArray<nsRefPtr<TestNonWrapperCacheInterface> >&, ErrorResult&); void ReceiveNullableNonWrapperCacheInterfaceSequence(nsTArray<nsRefPtr<TestNonWrapperCacheInterface> >&);
void ReceiveNonWrapperCacheInterfaceNullableSequence(Nullable<nsTArray<nsRefPtr<TestNonWrapperCacheInterface> > >&, ErrorResult&); void ReceiveNonWrapperCacheInterfaceNullableSequence(Nullable<nsTArray<nsRefPtr<TestNonWrapperCacheInterface> > >&);
void ReceiveNullableNonWrapperCacheInterfaceNullableSequence(Nullable<nsTArray<nsRefPtr<TestNonWrapperCacheInterface> > >&, ErrorResult&); void ReceiveNullableNonWrapperCacheInterfaceNullableSequence(Nullable<nsTArray<nsRefPtr<TestNonWrapperCacheInterface> > >&);
already_AddRefed<TestNonCastableInterface> ReceiveOther(ErrorResult&); already_AddRefed<TestNonCastableInterface> ReceiveOther();
already_AddRefed<TestNonCastableInterface> ReceiveNullableOther(ErrorResult&); already_AddRefed<TestNonCastableInterface> ReceiveNullableOther();
TestNonCastableInterface* ReceiveWeakOther(ErrorResult&); TestNonCastableInterface* ReceiveWeakOther();
TestNonCastableInterface* ReceiveWeakNullableOther(ErrorResult&); TestNonCastableInterface* ReceiveWeakNullableOther();
void PassOther(TestNonCastableInterface&, ErrorResult&); void PassOther(TestNonCastableInterface&);
void PassOther2(NonNull<TestNonCastableInterface>&, ErrorResult&); void PassOther2(NonNull<TestNonCastableInterface>&);
void PassNullableOther(TestNonCastableInterface*, ErrorResult&); void PassNullableOther(TestNonCastableInterface*);
already_AddRefed<TestNonCastableInterface> GetNonNullOther(ErrorResult&); already_AddRefed<TestNonCastableInterface> GetNonNullOther(ErrorResult&);
void SetNonNullOther(TestNonCastableInterface&, ErrorResult&); void SetNonNullOther(TestNonCastableInterface&, ErrorResult&);
already_AddRefed<TestNonCastableInterface> GetNullableOther(ErrorResult&); already_AddRefed<TestNonCastableInterface> GetNullableOther(ErrorResult&);
void SetNullableOther(TestNonCastableInterface*, ErrorResult&); void SetNullableOther(TestNonCastableInterface*, ErrorResult&);
void PassOptionalOther(const Optional<TestNonCastableInterface*>&, ErrorResult&); void PassOptionalOther(const Optional<TestNonCastableInterface*>&);
void PassOptionalNonNullOther(const Optional<NonNull<TestNonCastableInterface> >&, ErrorResult&); void PassOptionalNonNullOther(const Optional<NonNull<TestNonCastableInterface> >&);
void PassOptionalOtherWithDefault(TestNonCastableInterface*, ErrorResult&); void PassOptionalOtherWithDefault(TestNonCastableInterface*);
already_AddRefed<TestExternalInterface> ReceiveExternal(ErrorResult&); already_AddRefed<TestExternalInterface> ReceiveExternal();
already_AddRefed<TestExternalInterface> ReceiveNullableExternal(ErrorResult&); already_AddRefed<TestExternalInterface> ReceiveNullableExternal();
TestExternalInterface* ReceiveWeakExternal(ErrorResult&); TestExternalInterface* ReceiveWeakExternal();
TestExternalInterface* ReceiveWeakNullableExternal(ErrorResult&); TestExternalInterface* ReceiveWeakNullableExternal();
void PassExternal(TestExternalInterface*, ErrorResult&); void PassExternal(TestExternalInterface*);
void PassExternal2(TestExternalInterface*, ErrorResult&); void PassExternal2(TestExternalInterface*);
void PassNullableExternal(TestExternalInterface*, ErrorResult&); void PassNullableExternal(TestExternalInterface*);
already_AddRefed<TestExternalInterface> GetNonNullExternal(ErrorResult&); already_AddRefed<TestExternalInterface> GetNonNullExternal(ErrorResult&);
void SetNonNullExternal(TestExternalInterface*, ErrorResult&); void SetNonNullExternal(TestExternalInterface*, ErrorResult&);
already_AddRefed<TestExternalInterface> GetNullableExternal(ErrorResult&); already_AddRefed<TestExternalInterface> GetNullableExternal(ErrorResult&);
void SetNullableExternal(TestExternalInterface*, ErrorResult&); void SetNullableExternal(TestExternalInterface*, ErrorResult&);
void PassOptionalExternal(const Optional<TestExternalInterface*>&, ErrorResult&); void PassOptionalExternal(const Optional<TestExternalInterface*>&);
void PassOptionalNonNullExternal(const Optional<TestExternalInterface*>&, ErrorResult&); void PassOptionalNonNullExternal(const Optional<TestExternalInterface*>&);
void PassOptionalExternalWithDefault(TestExternalInterface*, ErrorResult&); void PassOptionalExternalWithDefault(TestExternalInterface*);
already_AddRefed<TestCallbackInterface> ReceiveCallbackInterface(ErrorResult&); already_AddRefed<TestCallbackInterface> ReceiveCallbackInterface();
already_AddRefed<TestCallbackInterface> ReceiveNullableCallbackInterface(ErrorResult&); already_AddRefed<TestCallbackInterface> ReceiveNullableCallbackInterface();
TestCallbackInterface* ReceiveWeakCallbackInterface(ErrorResult&); TestCallbackInterface* ReceiveWeakCallbackInterface();
TestCallbackInterface* ReceiveWeakNullableCallbackInterface(ErrorResult&); TestCallbackInterface* ReceiveWeakNullableCallbackInterface();
void PassCallbackInterface(TestCallbackInterface&, ErrorResult&); void PassCallbackInterface(TestCallbackInterface&);
void PassCallbackInterface2(OwningNonNull<TestCallbackInterface>, ErrorResult&); void PassCallbackInterface2(OwningNonNull<TestCallbackInterface>);
void PassNullableCallbackInterface(TestCallbackInterface*, ErrorResult&); void PassNullableCallbackInterface(TestCallbackInterface*);
already_AddRefed<TestCallbackInterface> GetNonNullCallbackInterface(ErrorResult&); already_AddRefed<TestCallbackInterface> GetNonNullCallbackInterface(ErrorResult&);
void SetNonNullCallbackInterface(TestCallbackInterface&, ErrorResult&); void SetNonNullCallbackInterface(TestCallbackInterface&, ErrorResult&);
already_AddRefed<TestCallbackInterface> GetNullableCallbackInterface(ErrorResult&); already_AddRefed<TestCallbackInterface> GetNullableCallbackInterface(ErrorResult&);
void SetNullableCallbackInterface(TestCallbackInterface*, ErrorResult&); void SetNullableCallbackInterface(TestCallbackInterface*, ErrorResult&);
void PassOptionalCallbackInterface(const Optional<nsRefPtr<TestCallbackInterface> >&, ErrorResult&); void PassOptionalCallbackInterface(const Optional<nsRefPtr<TestCallbackInterface> >&);
void PassOptionalNonNullCallbackInterface(const Optional<OwningNonNull<TestCallbackInterface> >&, ErrorResult&); void PassOptionalNonNullCallbackInterface(const Optional<OwningNonNull<TestCallbackInterface> >&);
void PassOptionalCallbackInterfaceWithDefault(TestCallbackInterface*, ErrorResult&); void PassOptionalCallbackInterfaceWithDefault(TestCallbackInterface*);
already_AddRefed<IndirectlyImplementedInterface> ReceiveConsequentialInterface(ErrorResult&); already_AddRefed<IndirectlyImplementedInterface> ReceiveConsequentialInterface();
void PassConsequentialInterface(IndirectlyImplementedInterface&, ErrorResult&); void PassConsequentialInterface(IndirectlyImplementedInterface&);
// Sequence types // Sequence types
void ReceiveSequence(nsTArray<int32_t>&, ErrorResult&); void ReceiveSequence(nsTArray<int32_t>&);
void ReceiveNullableSequence(Nullable< nsTArray<int32_t> >&, ErrorResult&); void ReceiveNullableSequence(Nullable< nsTArray<int32_t> >&);
void ReceiveSequenceOfNullableInts(nsTArray< Nullable<int32_t> >&, ErrorResult&); void ReceiveSequenceOfNullableInts(nsTArray< Nullable<int32_t> >&);
void ReceiveNullableSequenceOfNullableInts(Nullable< nsTArray< Nullable<int32_t> > >&, ErrorResult&); void ReceiveNullableSequenceOfNullableInts(Nullable< nsTArray< Nullable<int32_t> > >&);
void PassSequence(const Sequence<int32_t> &, ErrorResult&); void PassSequence(const Sequence<int32_t> &);
void PassNullableSequence(const Nullable< Sequence<int32_t> >&, ErrorResult&); void PassNullableSequence(const Nullable< Sequence<int32_t> >&);
void PassSequenceOfNullableInts(const Sequence<Nullable<int32_t> >&, ErrorResult&); void PassSequenceOfNullableInts(const Sequence<Nullable<int32_t> >&);
void PassOptionalSequenceOfNullableInts(const Optional<Sequence<Nullable<int32_t> > > &, void PassOptionalSequenceOfNullableInts(const Optional<Sequence<Nullable<int32_t> > > &);
ErrorResult&); void PassOptionalNullableSequenceOfNullableInts(const Optional<Nullable<Sequence<Nullable<int32_t> > > > &);
void PassOptionalNullableSequenceOfNullableInts(const Optional<Nullable<Sequence<Nullable<int32_t> > > > &, void ReceiveCastableObjectSequence(nsTArray< nsRefPtr<TestInterface> > &);
ErrorResult&); void ReceiveNullableCastableObjectSequence(nsTArray< nsRefPtr<TestInterface> > &);
void ReceiveCastableObjectSequence(nsTArray< nsRefPtr<TestInterface> > &, void ReceiveCastableObjectNullableSequence(Nullable< nsTArray< nsRefPtr<TestInterface> > >&);
ErrorResult&); void ReceiveNullableCastableObjectNullableSequence(Nullable< nsTArray< nsRefPtr<TestInterface> > >&);
void ReceiveNullableCastableObjectSequence(nsTArray< nsRefPtr<TestInterface> > &, void ReceiveWeakCastableObjectSequence(nsTArray<TestInterface*> &);
ErrorResult&); void ReceiveWeakNullableCastableObjectSequence(nsTArray<TestInterface*> &);
void ReceiveCastableObjectNullableSequence(Nullable< nsTArray< nsRefPtr<TestInterface> > >&, void ReceiveWeakCastableObjectNullableSequence(Nullable< nsTArray<TestInterface*> >&);
ErrorResult&); void ReceiveWeakNullableCastableObjectNullableSequence(Nullable< nsTArray<TestInterface*> >&);
void ReceiveNullableCastableObjectNullableSequence(Nullable< nsTArray< nsRefPtr<TestInterface> > >&, void PassCastableObjectSequence(const Sequence< OwningNonNull<TestInterface> >&);
ErrorResult&); void PassNullableCastableObjectSequence(const Sequence< nsRefPtr<TestInterface> > &);
void ReceiveWeakCastableObjectSequence(nsTArray<TestInterface*> &, void PassCastableObjectNullableSequence(const Nullable< Sequence< OwningNonNull<TestInterface> > >&);
ErrorResult&); void PassNullableCastableObjectNullableSequence(const Nullable< Sequence< nsRefPtr<TestInterface> > >&);
void ReceiveWeakNullableCastableObjectSequence(nsTArray<TestInterface*> &, void PassOptionalSequence(const Optional<Sequence<int32_t> >&);
ErrorResult&); void PassOptionalNullableSequence(const Optional<Nullable<Sequence<int32_t> > >&);
void ReceiveWeakCastableObjectNullableSequence(Nullable< nsTArray<TestInterface*> >&, void PassOptionalNullableSequenceWithDefaultValue(const Nullable< Sequence<int32_t> >&);
ErrorResult&); void PassOptionalObjectSequence(const Optional<Sequence<OwningNonNull<TestInterface> > >&);
void ReceiveWeakNullableCastableObjectNullableSequence(Nullable< nsTArray<TestInterface*> >&,
ErrorResult&);
void PassCastableObjectSequence(const Sequence< OwningNonNull<TestInterface> >&,
ErrorResult&);
void PassNullableCastableObjectSequence(const Sequence< nsRefPtr<TestInterface> > &,
ErrorResult&);
void PassCastableObjectNullableSequence(const Nullable< Sequence< OwningNonNull<TestInterface> > >&,
ErrorResult&);
void PassNullableCastableObjectNullableSequence(const Nullable< Sequence< nsRefPtr<TestInterface> > >&,
ErrorResult&);
void PassOptionalSequence(const Optional<Sequence<int32_t> >&,
ErrorResult&);
void PassOptionalNullableSequence(const Optional<Nullable<Sequence<int32_t> > >&,
ErrorResult&);
void PassOptionalNullableSequenceWithDefaultValue(const Nullable< Sequence<int32_t> >&,
ErrorResult&);
void PassOptionalObjectSequence(const Optional<Sequence<OwningNonNull<TestInterface> > >&,
ErrorResult&);
void ReceiveStringSequence(nsTArray<nsString>&, ErrorResult&); void ReceiveStringSequence(nsTArray<nsString>&);
void PassStringSequence(const Sequence<nsString>&, ErrorResult&); void PassStringSequence(const Sequence<nsString>&);
// Typed array types // Typed array types
void PassArrayBuffer(ArrayBuffer&, ErrorResult&); void PassArrayBuffer(ArrayBuffer&);
void PassNullableArrayBuffer(ArrayBuffer*, ErrorResult&); void PassNullableArrayBuffer(ArrayBuffer*);
void PassOptionalArrayBuffer(const Optional<ArrayBuffer>&, ErrorResult&); void PassOptionalArrayBuffer(const Optional<ArrayBuffer>&);
void PassOptionalNullableArrayBuffer(const Optional<ArrayBuffer*>&, ErrorResult&); void PassOptionalNullableArrayBuffer(const Optional<ArrayBuffer*>&);
void PassOptionalNullableArrayBufferWithDefaultValue(ArrayBuffer*, ErrorResult&); void PassOptionalNullableArrayBufferWithDefaultValue(ArrayBuffer*);
void PassArrayBufferView(ArrayBufferView&, ErrorResult&); void PassArrayBufferView(ArrayBufferView&);
void PassInt8Array(Int8Array&, ErrorResult&); void PassInt8Array(Int8Array&);
void PassInt16Array(Int16Array&, ErrorResult&); void PassInt16Array(Int16Array&);
void PassInt32Array(Int32Array&, ErrorResult&); void PassInt32Array(Int32Array&);
void PassUint8Array(Uint8Array&, ErrorResult&); void PassUint8Array(Uint8Array&);
void PassUint16Array(Uint16Array&, ErrorResult&); void PassUint16Array(Uint16Array&);
void PassUint32Array(Uint32Array&, ErrorResult&); void PassUint32Array(Uint32Array&);
void PassUint8ClampedArray(Uint8ClampedArray&, ErrorResult&); void PassUint8ClampedArray(Uint8ClampedArray&);
void PassFloat32Array(Float32Array&, ErrorResult&); void PassFloat32Array(Float32Array&);
void PassFloat64Array(Float64Array&, ErrorResult&); void PassFloat64Array(Float64Array&);
JSObject* ReceiveUint8Array(ErrorResult&); JSObject* ReceiveUint8Array();
// String types // String types
void PassString(const nsAString&, ErrorResult&); void PassString(const nsAString&);
void PassNullableString(const nsAString&, ErrorResult&); void PassNullableString(const nsAString&);
void PassOptionalString(const Optional<nsAString>&, ErrorResult&); void PassOptionalString(const Optional<nsAString>&);
void PassOptionalStringWithDefaultValue(const nsAString&, ErrorResult&); void PassOptionalStringWithDefaultValue(const nsAString&);
void PassOptionalNullableString(const Optional<nsAString>&, ErrorResult&); void PassOptionalNullableString(const Optional<nsAString>&);
void PassOptionalNullableStringWithDefaultValue(const nsAString&, ErrorResult&); void PassOptionalNullableStringWithDefaultValue(const nsAString&);
// Enumarated types // Enumarated types
void PassEnum(TestEnum, ErrorResult&); void PassEnum(TestEnum);
void PassOptionalEnum(const Optional<TestEnum>&, ErrorResult&); void PassOptionalEnum(const Optional<TestEnum>&);
void PassEnumWithDefault(TestEnum, ErrorResult&); void PassEnumWithDefault(TestEnum);
TestEnum ReceiveEnum(ErrorResult&); TestEnum ReceiveEnum();
TestEnum GetEnumAttribute(ErrorResult&); TestEnum GetEnumAttribute(ErrorResult&);
TestEnum GetReadonlyEnumAttribute(ErrorResult&); TestEnum GetReadonlyEnumAttribute(ErrorResult&);
void SetEnumAttribute(TestEnum, ErrorResult&); void SetEnumAttribute(TestEnum, ErrorResult&);
// Callback types // Callback types
void PassCallback(JSContext*, JSObject*, ErrorResult&); void PassCallback(JSContext*, JSObject*);
void PassNullableCallback(JSContext*, JSObject*, ErrorResult&); void PassNullableCallback(JSContext*, JSObject*);
void PassOptionalCallback(JSContext*, const Optional<JSObject*>&, void PassOptionalCallback(JSContext*, const Optional<JSObject*>&);
ErrorResult&); void PassOptionalNullableCallback(JSContext*, const Optional<JSObject*>&);
void PassOptionalNullableCallback(JSContext*, const Optional<JSObject*>&, void PassOptionalNullableCallbackWithDefaultValue(JSContext*, JSObject*);
ErrorResult&); JSObject* ReceiveCallback(JSContext*);
void PassOptionalNullableCallbackWithDefaultValue(JSContext*, JSObject*, JSObject* ReceiveNullableCallback(JSContext*);
ErrorResult&);
JSObject* ReceiveCallback(JSContext*, ErrorResult&);
JSObject* ReceiveNullableCallback(JSContext*, ErrorResult&);
// Any types // Any types
void PassAny(JSContext*, JS::Value, ErrorResult&); void PassAny(JSContext*, JS::Value);
void PassOptionalAny(JSContext*, const Optional<JS::Value>&, ErrorResult&); void PassOptionalAny(JSContext*, const Optional<JS::Value>&);
void PassAnyDefaultNull(JSContext*, JS::Value, ErrorResult&); void PassAnyDefaultNull(JSContext*, JS::Value);
JS::Value ReceiveAny(JSContext*, ErrorResult&); JS::Value ReceiveAny(JSContext*);
// object types // object types
void PassObject(JSContext*, JSObject&, ErrorResult&); void PassObject(JSContext*, JSObject&);
void PassNullableObject(JSContext*, JSObject*, ErrorResult&); void PassNullableObject(JSContext*, JSObject*);
void PassOptionalObject(JSContext*, const Optional<NonNull<JSObject> >&, ErrorResult&); void PassOptionalObject(JSContext*, const Optional<NonNull<JSObject> >&);
void PassOptionalNullableObject(JSContext*, const Optional<JSObject*>&, ErrorResult&); void PassOptionalNullableObject(JSContext*, const Optional<JSObject*>&);
void PassOptionalNullableObjectWithDefaultValue(JSContext*, JSObject*, ErrorResult&); void PassOptionalNullableObjectWithDefaultValue(JSContext*, JSObject*);
JSObject* ReceiveObject(JSContext*, ErrorResult&); JSObject* ReceiveObject(JSContext*);
JSObject* ReceiveNullableObject(JSContext*, ErrorResult&); JSObject* ReceiveNullableObject(JSContext*);
// Union types // Union types
void PassUnion(JSContext*, const ObjectOrLong& arg, ErrorResult&); void PassUnion(JSContext*, const ObjectOrLong& arg);
void PassUnionWithNullable(JSContext*, const ObjectOrNullOrLong& arg, ErrorResult&) void PassUnionWithNullable(JSContext*, const ObjectOrNullOrLong& arg)
{ {
ObjectOrLong returnValue; ObjectOrLong returnValue;
if (arg.IsNull()) { if (arg.IsNull()) {
@ -391,43 +369,43 @@ public:
i += 1; i += 1;
} }
} }
void PassNullableUnion(JSContext*, const Nullable<ObjectOrLong>&, ErrorResult&); void PassNullableUnion(JSContext*, const Nullable<ObjectOrLong>&);
void PassOptionalUnion(JSContext*, const Optional<ObjectOrLong>&, ErrorResult&); void PassOptionalUnion(JSContext*, const Optional<ObjectOrLong>&);
void PassOptionalNullableUnion(JSContext*, const Optional<Nullable<ObjectOrLong> >&, ErrorResult&); void PassOptionalNullableUnion(JSContext*, const Optional<Nullable<ObjectOrLong> >&);
void PassOptionalNullableUnionWithDefaultValue(JSContext*, const Nullable<ObjectOrLong>&, ErrorResult&); void PassOptionalNullableUnionWithDefaultValue(JSContext*, const Nullable<ObjectOrLong>&);
//void PassUnionWithInterfaces(const TestInterfaceOrTestExternalInterface& arg, ErrorResult&); //void PassUnionWithInterfaces(const TestInterfaceOrTestExternalInterface& arg);
//void PassUnionWithInterfacesAndNullable(const TestInterfaceOrNullOrTestExternalInterface& arg, ErrorResult&); //void PassUnionWithInterfacesAndNullable(const TestInterfaceOrNullOrTestExternalInterface& arg);
void PassUnionWithArrayBuffer(const ArrayBufferOrLong&, ErrorResult&); void PassUnionWithArrayBuffer(const ArrayBufferOrLong&);
void PassUnionWithString(JSContext*, const StringOrObject&, ErrorResult&); void PassUnionWithString(JSContext*, const StringOrObject&);
//void PassUnionWithEnum(JSContext*, const TestEnumOrObject&, ErrorResult&); //void PassUnionWithEnum(JSContext*, const TestEnumOrObject&);
void PassUnionWithCallback(JSContext*, const TestCallbackOrLong&, ErrorResult&); void PassUnionWithCallback(JSContext*, const TestCallbackOrLong&);
void PassUnionWithObject(JSContext*, const ObjectOrLong&, ErrorResult&); void PassUnionWithObject(JSContext*, const ObjectOrLong&);
// binaryNames tests // binaryNames tests
void MethodRenamedTo(ErrorResult&); void MethodRenamedTo();
void MethodRenamedTo(int8_t, ErrorResult&); void MethodRenamedTo(int8_t);
int8_t GetAttributeGetterRenamedTo(ErrorResult&); int8_t GetAttributeGetterRenamedTo(ErrorResult&);
int8_t GetAttributeRenamedTo(ErrorResult&); int8_t GetAttributeRenamedTo(ErrorResult&);
void SetAttributeRenamedTo(int8_t, ErrorResult&); void SetAttributeRenamedTo(int8_t, ErrorResult&);
// Dictionary tests // Dictionary tests
void PassDictionary(const Dict&, ErrorResult&); void PassDictionary(const Dict&);
void PassOtherDictionary(const GrandparentDict&, ErrorResult&); void PassOtherDictionary(const GrandparentDict&);
void PassSequenceOfDictionaries(const Sequence<Dict>&, ErrorResult&); void PassSequenceOfDictionaries(const Sequence<Dict>&);
void PassDictionaryOrLong(const Dict&, ErrorResult&); void PassDictionaryOrLong(const Dict&);
void PassDictionaryOrLong(int32_t, ErrorResult&); void PassDictionaryOrLong(int32_t);
void PassDictContainingDict(const DictContainingDict&, ErrorResult&); void PassDictContainingDict(const DictContainingDict&);
// Methods and properties imported via "implements" // Methods and properties imported via "implements"
bool GetImplementedProperty(ErrorResult&); bool GetImplementedProperty(ErrorResult&);
void SetImplementedProperty(bool, ErrorResult&); void SetImplementedProperty(bool, ErrorResult&);
void ImplementedMethod(ErrorResult&); void ImplementedMethod();
bool GetImplementedParentProperty(ErrorResult&); bool GetImplementedParentProperty(ErrorResult&);
void SetImplementedParentProperty(bool, ErrorResult&); void SetImplementedParentProperty(bool, ErrorResult&);
void ImplementedParentMethod(ErrorResult&); void ImplementedParentMethod();
bool GetIndirectlyImplementedProperty(ErrorResult&); bool GetIndirectlyImplementedProperty(ErrorResult&);
void SetIndirectlyImplementedProperty(bool, ErrorResult&); void SetIndirectlyImplementedProperty(bool, ErrorResult&);
void IndirectlyImplementedMethod(ErrorResult&); void IndirectlyImplementedMethod();
uint32_t GetDiamondImplementedProperty(ErrorResult&); uint32_t GetDiamondImplementedProperty(ErrorResult&);
private: private:
@ -438,124 +416,120 @@ private:
template<typename T> template<typename T>
void SetWritableByte(T, ErrorResult&) MOZ_DELETE; void SetWritableByte(T, ErrorResult&) MOZ_DELETE;
template<typename T> template<typename T>
void PassByte(T, ErrorResult&) MOZ_DELETE; void PassByte(T) MOZ_DELETE;
template<typename T> template<typename T>
void PassOptionalByte(const Optional<T>&, ErrorResult&) MOZ_DELETE; void PassOptionalByte(const Optional<T>&) MOZ_DELETE;
template<typename T> template<typename T>
void PassOptionalByteWithDefault(T, ErrorResult&) MOZ_DELETE; void PassOptionalByteWithDefault(T) MOZ_DELETE;
void SetReadonlyShort(int16_t, ErrorResult&) MOZ_DELETE; void SetReadonlyShort(int16_t, ErrorResult&) MOZ_DELETE;
template<typename T> template<typename T>
void SetWritableShort(T, ErrorResult&) MOZ_DELETE; void SetWritableShort(T, ErrorResult&) MOZ_DELETE;
template<typename T> template<typename T>
void PassShort(T, ErrorResult&) MOZ_DELETE; void PassShort(T) MOZ_DELETE;
template<typename T> template<typename T>
void PassOptionalShort(const Optional<T>&, ErrorResult&) MOZ_DELETE; void PassOptionalShort(const Optional<T>&) MOZ_DELETE;
template<typename T> template<typename T>
void PassOptionalShortWithDefault(T, ErrorResult&) MOZ_DELETE; void PassOptionalShortWithDefault(T) MOZ_DELETE;
void SetReadonlyLong(int32_t, ErrorResult&) MOZ_DELETE; void SetReadonlyLong(int32_t, ErrorResult&) MOZ_DELETE;
template<typename T> template<typename T>
void SetWritableLong(T, ErrorResult&) MOZ_DELETE; void SetWritableLong(T, ErrorResult&) MOZ_DELETE;
template<typename T> template<typename T>
void PassLong(T, ErrorResult&) MOZ_DELETE; void PassLong(T) MOZ_DELETE;
template<typename T> template<typename T>
void PassOptionalLong(const Optional<T>&, ErrorResult&) MOZ_DELETE; void PassOptionalLong(const Optional<T>&) MOZ_DELETE;
template<typename T> template<typename T>
void PassOptionalLongWithDefault(T, ErrorResult&) MOZ_DELETE; void PassOptionalLongWithDefault(T) MOZ_DELETE;
void SetReadonlyLongLong(int64_t, ErrorResult&) MOZ_DELETE; void SetReadonlyLongLong(int64_t, ErrorResult&) MOZ_DELETE;
template<typename T> template<typename T>
void SetWritableLongLong(T, ErrorResult&) MOZ_DELETE; void SetWritableLongLong(T, ErrorResult&) MOZ_DELETE;
template<typename T> template<typename T>
void PassLongLong(T, ErrorResult&) MOZ_DELETE; void PassLongLong(T) MOZ_DELETE;
template<typename T> template<typename T>
void PassOptionalLongLong(const Optional<T>&, ErrorResult&) MOZ_DELETE; void PassOptionalLongLong(const Optional<T>&) MOZ_DELETE;
template<typename T> template<typename T>
void PassOptionalLongLongWithDefault(T, ErrorResult&) MOZ_DELETE; void PassOptionalLongLongWithDefault(T) MOZ_DELETE;
void SetReadonlyOctet(uint8_t, ErrorResult&) MOZ_DELETE; void SetReadonlyOctet(uint8_t, ErrorResult&) MOZ_DELETE;
template<typename T> template<typename T>
void SetWritableOctet(T, ErrorResult&) MOZ_DELETE; void SetWritableOctet(T, ErrorResult&) MOZ_DELETE;
template<typename T> template<typename T>
void PassOctet(T, ErrorResult&) MOZ_DELETE; void PassOctet(T) MOZ_DELETE;
template<typename T> template<typename T>
void PassOptionalOctet(const Optional<T>&, ErrorResult&) MOZ_DELETE; void PassOptionalOctet(const Optional<T>&) MOZ_DELETE;
template<typename T> template<typename T>
void PassOptionalOctetWithDefault(T, ErrorResult&) MOZ_DELETE; void PassOptionalOctetWithDefault(T) MOZ_DELETE;
void SetReadonlyUnsignedShort(uint16_t, ErrorResult&) MOZ_DELETE; void SetReadonlyUnsignedShort(uint16_t, ErrorResult&) MOZ_DELETE;
template<typename T> template<typename T>
void SetWritableUnsignedShort(T, ErrorResult&) MOZ_DELETE; void SetWritableUnsignedShort(T, ErrorResult&) MOZ_DELETE;
template<typename T> template<typename T>
void PassUnsignedShort(T, ErrorResult&) MOZ_DELETE; void PassUnsignedShort(T) MOZ_DELETE;
template<typename T> template<typename T>
void PassOptionalUnsignedShort(const Optional<T>&, ErrorResult&) MOZ_DELETE; void PassOptionalUnsignedShort(const Optional<T>&) MOZ_DELETE;
template<typename T> template<typename T>
void PassOptionalUnsignedShortWithDefault(T, ErrorResult&) MOZ_DELETE; void PassOptionalUnsignedShortWithDefault(T) MOZ_DELETE;
void SetReadonlyUnsignedLong(uint32_t, ErrorResult&) MOZ_DELETE; void SetReadonlyUnsignedLong(uint32_t, ErrorResult&) MOZ_DELETE;
template<typename T> template<typename T>
void SetWritableUnsignedLong(T, ErrorResult&) MOZ_DELETE; void SetWritableUnsignedLong(T, ErrorResult&) MOZ_DELETE;
template<typename T> template<typename T>
void PassUnsignedLong(T, ErrorResult&) MOZ_DELETE; void PassUnsignedLong(T) MOZ_DELETE;
template<typename T> template<typename T>
void PassOptionalUnsignedLong(const Optional<T>&, ErrorResult&) MOZ_DELETE; void PassOptionalUnsignedLong(const Optional<T>&) MOZ_DELETE;
template<typename T> template<typename T>
void PassOptionalUnsignedLongWithDefault(T, ErrorResult&) MOZ_DELETE; void PassOptionalUnsignedLongWithDefault(T) MOZ_DELETE;
void SetReadonlyUnsignedLongLong(uint64_t, ErrorResult&) MOZ_DELETE; void SetReadonlyUnsignedLongLong(uint64_t, ErrorResult&) MOZ_DELETE;
template<typename T> template<typename T>
void SetWritableUnsignedLongLong(T, ErrorResult&) MOZ_DELETE; void SetWritableUnsignedLongLong(T, ErrorResult&) MOZ_DELETE;
template<typename T> template<typename T>
void PassUnsignedLongLong(T, ErrorResult&) MOZ_DELETE; void PassUnsignedLongLong(T) MOZ_DELETE;
template<typename T> template<typename T>
void PassOptionalUnsignedLongLong(const Optional<T>&, ErrorResult&) MOZ_DELETE; void PassOptionalUnsignedLongLong(const Optional<T>&) MOZ_DELETE;
template<typename T> template<typename T>
void PassOptionalUnsignedLongLongWithDefault(T, ErrorResult&) MOZ_DELETE; void PassOptionalUnsignedLongLongWithDefault(T) MOZ_DELETE;
// Enforce that only const things are passed for sequences // Enforce that only const things are passed for sequences
void PassSequence(Sequence<int32_t> &, ErrorResult&) MOZ_DELETE; void PassSequence(Sequence<int32_t> &) MOZ_DELETE;
void PassNullableSequence(Nullable< Sequence<int32_t> >&, ErrorResult&) MOZ_DELETE; void PassNullableSequence(Nullable< Sequence<int32_t> >&) MOZ_DELETE;
void PassOptionalNullableSequenceWithDefaultValue(Nullable< Sequence<int32_t> >&, void PassOptionalNullableSequenceWithDefaultValue(Nullable< Sequence<int32_t> >&) MOZ_DELETE;
ErrorResult&) MOZ_DELETE;
// Enforce that only const things are passed for optional // Enforce that only const things are passed for optional
void PassOptionalByte(Optional<int8_t>&, ErrorResult&) MOZ_DELETE; void PassOptionalByte(Optional<int8_t>&) MOZ_DELETE;
void PassOptionalNullableByte(Optional<Nullable<int8_t> >&, void PassOptionalNullableByte(Optional<Nullable<int8_t> >&) MOZ_DELETE;
ErrorResult&) MOZ_DELETE; void PassOptionalShort(Optional<int16_t>&) MOZ_DELETE;
void PassOptionalShort(Optional<int16_t>&, ErrorResult&) MOZ_DELETE; void PassOptionalLong(Optional<int32_t>&) MOZ_DELETE;
void PassOptionalLong(Optional<int32_t>&, ErrorResult&) MOZ_DELETE; void PassOptionalLongLong(Optional<int64_t>&) MOZ_DELETE;
void PassOptionalLongLong(Optional<int64_t>&, ErrorResult&) MOZ_DELETE; void PassOptionalOctet(Optional<uint8_t>&) MOZ_DELETE;
void PassOptionalOctet(Optional<uint8_t>&, ErrorResult&) MOZ_DELETE; void PassOptionalUnsignedShort(Optional<uint16_t>&) MOZ_DELETE;
void PassOptionalUnsignedShort(Optional<uint16_t>&, ErrorResult&) MOZ_DELETE; void PassOptionalUnsignedLong(Optional<uint32_t>&) MOZ_DELETE;
void PassOptionalUnsignedLong(Optional<uint32_t>&, ErrorResult&) MOZ_DELETE; void PassOptionalUnsignedLongLong(Optional<uint64_t>&) MOZ_DELETE;
void PassOptionalUnsignedLongLong(Optional<uint64_t>&, ErrorResult&) MOZ_DELETE; void PassOptionalSelf(Optional<TestInterface*> &) MOZ_DELETE;
void PassOptionalSelf(Optional<TestInterface*> &, ErrorResult&) MOZ_DELETE; void PassOptionalNonNullSelf(Optional<NonNull<TestInterface> >&) MOZ_DELETE;
void PassOptionalNonNullSelf(Optional<NonNull<TestInterface> >&, ErrorResult&) MOZ_DELETE; void PassOptionalOther(Optional<TestNonCastableInterface*>&);
void PassOptionalOther(Optional<TestNonCastableInterface*>&, ErrorResult&); void PassOptionalNonNullOther(Optional<NonNull<TestNonCastableInterface> >&);
void PassOptionalNonNullOther(Optional<NonNull<TestNonCastableInterface> >&, ErrorResult&); void PassOptionalExternal(Optional<TestExternalInterface*>&) MOZ_DELETE;
void PassOptionalExternal(Optional<TestExternalInterface*>&, ErrorResult&) MOZ_DELETE; void PassOptionalNonNullExternal(Optional<TestExternalInterface*>&) MOZ_DELETE;
void PassOptionalNonNullExternal(Optional<TestExternalInterface*>&, ErrorResult&) MOZ_DELETE; void PassOptionalSequence(Optional<Sequence<int32_t> >&) MOZ_DELETE;
void PassOptionalSequence(Optional<Sequence<int32_t> >&, ErrorResult&) MOZ_DELETE; void PassOptionalNullableSequence(Optional<Nullable<Sequence<int32_t> > >&) MOZ_DELETE;
void PassOptionalNullableSequence(Optional<Nullable<Sequence<int32_t> > >&, void PassOptionalObjectSequence(Optional<Sequence<OwningNonNull<TestInterface> > >&) MOZ_DELETE;
ErrorResult&) MOZ_DELETE; void PassOptionalArrayBuffer(Optional<ArrayBuffer>&) MOZ_DELETE;
void PassOptionalObjectSequence(Optional<Sequence<OwningNonNull<TestInterface> > >&, void PassOptionalNullableArrayBuffer(Optional<ArrayBuffer*>&) MOZ_DELETE;
ErrorResult&) MOZ_DELETE; void PassOptionalEnum(Optional<TestEnum>&) MOZ_DELETE;
void PassOptionalArrayBuffer(Optional<ArrayBuffer>&, ErrorResult&) MOZ_DELETE; void PassOptionalCallback(JSContext*, Optional<JSObject*>&) MOZ_DELETE;
void PassOptionalNullableArrayBuffer(Optional<ArrayBuffer*>&, ErrorResult&) MOZ_DELETE; void PassOptionalNullableCallback(JSContext*, Optional<JSObject*>&) MOZ_DELETE;
void PassOptionalEnum(Optional<TestEnum>&, ErrorResult&) MOZ_DELETE; void PassOptionalAny(Optional<JS::Value>&) MOZ_DELETE;
void PassOptionalCallback(JSContext*, Optional<JSObject*>&, ErrorResult&) MOZ_DELETE;
void PassOptionalNullableCallback(JSContext*, Optional<JSObject*>&, ErrorResult&) MOZ_DELETE;
void PassOptionalAny(Optional<JS::Value>&, ErrorResult) MOZ_DELETE;
// And test that string stuff is always const // And test that string stuff is always const
void PassString(nsAString&, ErrorResult&) MOZ_DELETE; void PassString(nsAString&) MOZ_DELETE;
void PassNullableString(nsAString&, ErrorResult&) MOZ_DELETE; void PassNullableString(nsAString&) MOZ_DELETE;
void PassOptionalString(Optional<nsAString>&, ErrorResult&) MOZ_DELETE; void PassOptionalString(Optional<nsAString>&) MOZ_DELETE;
void PassOptionalStringWithDefaultValue(nsAString&, ErrorResult&) MOZ_DELETE; void PassOptionalStringWithDefaultValue(nsAString&) MOZ_DELETE;
void PassOptionalNullableString(Optional<nsAString>&, ErrorResult&) MOZ_DELETE; void PassOptionalNullableString(Optional<nsAString>&) MOZ_DELETE;
void PassOptionalNullableStringWithDefaultValue(nsAString&, ErrorResult&) MOZ_DELETE; void PassOptionalNullableStringWithDefaultValue(nsAString&) MOZ_DELETE;
}; };
@ -568,10 +542,10 @@ public:
// We need a GetParentObject to make binding codegen happy // We need a GetParentObject to make binding codegen happy
virtual nsISupports* GetParentObject(); virtual nsISupports* GetParentObject();
uint32_t IndexedGetter(uint32_t, bool&, ErrorResult&); uint32_t IndexedGetter(uint32_t, bool&);
uint32_t IndexedGetter(uint32_t, ErrorResult&) MOZ_DELETE; uint32_t IndexedGetter(uint32_t&) MOZ_DELETE;
uint32_t Item(uint32_t, ErrorResult&); uint32_t Item(uint32_t&);
uint32_t Item(uint32_t, bool&, ErrorResult&) MOZ_DELETE; uint32_t Item(uint32_t, bool&) MOZ_DELETE;
uint32_t GetLength(); uint32_t GetLength();
}; };
@ -584,7 +558,7 @@ public:
// We need a GetParentObject to make binding codegen happy // We need a GetParentObject to make binding codegen happy
virtual nsISupports* GetParentObject(); virtual nsISupports* GetParentObject();
void NamedGetter(const nsAString&, bool&, nsAString&, ErrorResult&); void NamedGetter(const nsAString&, bool&, nsAString&);
}; };
class TestIndexedAndNamedGetterInterface : public nsISupports, class TestIndexedAndNamedGetterInterface : public nsISupports,
@ -596,9 +570,9 @@ public:
// We need a GetParentObject to make binding codegen happy // We need a GetParentObject to make binding codegen happy
virtual nsISupports* GetParentObject(); virtual nsISupports* GetParentObject();
uint32_t IndexedGetter(uint32_t, bool&, ErrorResult&); uint32_t IndexedGetter(uint32_t, bool&);
void NamedGetter(const nsAString&, bool&, nsAString&, ErrorResult&); void NamedGetter(const nsAString&, bool&, nsAString&);
void NamedItem(const nsAString&, nsAString&, ErrorResult&); void NamedItem(const nsAString&, nsAString&);
uint32_t GetLength(); uint32_t GetLength();
}; };
@ -611,8 +585,8 @@ public:
// We need a GetParentObject to make binding codegen happy // We need a GetParentObject to make binding codegen happy
virtual nsISupports* GetParentObject(); virtual nsISupports* GetParentObject();
void IndexedSetter(uint32_t, const nsAString&, ErrorResult&); void IndexedSetter(uint32_t, const nsAString&);
void SetItem(uint32_t, const nsAString&, ErrorResult&); void SetItem(uint32_t, const nsAString&);
}; };
class TestNamedSetterInterface : public nsISupports, class TestNamedSetterInterface : public nsISupports,
@ -624,7 +598,7 @@ public:
// We need a GetParentObject to make binding codegen happy // We need a GetParentObject to make binding codegen happy
virtual nsISupports* GetParentObject(); virtual nsISupports* GetParentObject();
void NamedSetter(const nsAString&, TestIndexedSetterInterface&, ErrorResult&); void NamedSetter(const nsAString&, TestIndexedSetterInterface&);
}; };
class TestIndexedAndNamedSetterInterface : public nsISupports, class TestIndexedAndNamedSetterInterface : public nsISupports,
@ -636,21 +610,21 @@ public:
// We need a GetParentObject to make binding codegen happy // We need a GetParentObject to make binding codegen happy
virtual nsISupports* GetParentObject(); virtual nsISupports* GetParentObject();
void IndexedSetter(uint32_t, TestIndexedSetterInterface&, ErrorResult&); void IndexedSetter(uint32_t, TestIndexedSetterInterface&);
void NamedSetter(const nsAString&, TestIndexedSetterInterface&, ErrorResult&); void NamedSetter(const nsAString&, TestIndexedSetterInterface&);
void SetNamedItem(const nsAString&, TestIndexedSetterInterface&, ErrorResult&); void SetNamedItem(const nsAString&, TestIndexedSetterInterface&);
}; };
class TestIndexedAndNamedGetterAndSetterInterface : public TestIndexedSetterInterface class TestIndexedAndNamedGetterAndSetterInterface : public TestIndexedSetterInterface
{ {
public: public:
uint32_t IndexedGetter(uint32_t, bool&, ErrorResult&); uint32_t IndexedGetter(uint32_t, bool&);
uint32_t Item(uint32_t, ErrorResult&); uint32_t Item(uint32_t);
void NamedGetter(const nsAString&, bool&, nsAString&, ErrorResult&); void NamedGetter(const nsAString&, bool&, nsAString&);
void NamedItem(const nsAString&, nsAString&, ErrorResult&); void NamedItem(const nsAString&, nsAString&);
void IndexedSetter(uint32_t, int32_t&, ErrorResult&); void IndexedSetter(uint32_t, int32_t&);
void IndexedSetter(uint32_t, const nsAString&, ErrorResult&) MOZ_DELETE; void IndexedSetter(uint32_t, const nsAString&) MOZ_DELETE;
void NamedSetter(const nsAString&, const nsAString&, ErrorResult&); void NamedSetter(const nsAString&, const nsAString&);
void Stringify(nsAString&); void Stringify(nsAString&);
uint32_t GetLength(); uint32_t GetLength();
}; };

View File

@ -36,7 +36,7 @@ interface OnlyForUseInConstructor {
] ]
interface TestInterface { interface TestInterface {
// Integer types // Integer types
// XXXbz add tests for infallible versions of all the integer stuff // XXXbz add tests for throwing versions of all the integer stuff
readonly attribute byte readonlyByte; readonly attribute byte readonlyByte;
attribute byte writableByte; attribute byte writableByte;
void passByte(byte arg); void passByte(byte arg);
@ -96,7 +96,7 @@ interface TestInterface {
void passOptionalUnsignedLongLongWithDefault(optional unsigned long long arg = 17); void passOptionalUnsignedLongLongWithDefault(optional unsigned long long arg = 17);
// Castable interface types // Castable interface types
// XXXbz add tests for infallible versions of all the castable interface stuff // XXXbz add tests for throwing versions of all the castable interface stuff
TestInterface receiveSelf(); TestInterface receiveSelf();
TestInterface? receiveNullableSelf(); TestInterface? receiveNullableSelf();
TestInterface receiveWeakSelf(); TestInterface receiveWeakSelf();

View File

@ -16,17 +16,19 @@ interface CSSStyleDeclaration {
[Infallible] [Infallible]
readonly attribute unsigned long length; readonly attribute unsigned long length;
[Infallible]
getter DOMString item(unsigned long index); getter DOMString item(unsigned long index);
[Throws]
DOMString getPropertyValue(DOMString property); DOMString getPropertyValue(DOMString property);
// Mozilla extension, sort of // Mozilla extension, sort of
[Throws]
CSSValue getPropertyCSSValue(DOMString property); CSSValue getPropertyCSSValue(DOMString property);
[Infallible]
DOMString getPropertyPriority(DOMString property); DOMString getPropertyPriority(DOMString property);
// This would be nicer if it used a string default value of "". // This would be nicer if it used a string default value of "".
// See bug 759622. // See bug 759622.
[Throws]
void setProperty(DOMString property, DOMString value, [TreatNullAs=EmptyString] optional DOMString priority); void setProperty(DOMString property, DOMString value, [TreatNullAs=EmptyString] optional DOMString priority);
[Throws]
DOMString removeProperty(DOMString property); DOMString removeProperty(DOMString property);
[Infallible] [Infallible]

View File

@ -29,17 +29,20 @@ interface CanvasRenderingContext2D {
readonly attribute HTMLCanvasElement canvas; readonly attribute HTMLCanvasElement canvas;
// state // state
[Infallible]
void save(); // push state on state stack void save(); // push state on state stack
[Infallible]
void restore(); // pop state stack and restore state void restore(); // pop state stack and restore state
// transformations (default transform is the identity matrix) // transformations (default transform is the identity matrix)
// NOT IMPLEMENTED attribute SVGMatrix currentTransform; // NOT IMPLEMENTED attribute SVGMatrix currentTransform;
[Throws]
void scale(double x, double y); void scale(double x, double y);
[Throws]
void rotate(double angle); void rotate(double angle);
[Throws]
void translate(double x, double y); void translate(double x, double y);
[Throws]
void transform(double a, double b, double c, double d, double e, double f); void transform(double a, double b, double c, double d, double e, double f);
[Throws]
void setTransform(double a, double b, double c, double d, double e, double f); void setTransform(double a, double b, double c, double d, double e, double f);
// NOT IMPLEMENTED void resetTransform(); // NOT IMPLEMENTED void resetTransform();
@ -53,8 +56,11 @@ interface CanvasRenderingContext2D {
attribute any strokeStyle; // (default black) attribute any strokeStyle; // (default black)
[SetterInfallible] [SetterInfallible]
attribute any fillStyle; // (default black) attribute any fillStyle; // (default black)
[Throws]
CanvasGradient createLinearGradient(double x0, double y0, double x1, double y1); CanvasGradient createLinearGradient(double x0, double y0, double x1, double y1);
[Throws]
CanvasGradient createRadialGradient(double x0, double y0, double r0, double x1, double y1, double r1); CanvasGradient createRadialGradient(double x0, double y0, double r0, double x1, double y1, double r1);
[Throws]
CanvasPattern createPattern((HTMLImageElement or HTMLCanvasElement or HTMLVideoElement) image, [TreatNullAs=EmptyString] DOMString repetition); CanvasPattern createPattern((HTMLImageElement or HTMLCanvasElement or HTMLVideoElement) image, [TreatNullAs=EmptyString] DOMString repetition);
// shadows // shadows
@ -68,20 +74,14 @@ interface CanvasRenderingContext2D {
attribute DOMString shadowColor; // (default transparent black) attribute DOMString shadowColor; // (default transparent black)
// rects // rects
[Infallible]
void clearRect(double x, double y, double w, double h); void clearRect(double x, double y, double w, double h);
[Infallible]
void fillRect(double x, double y, double w, double h); void fillRect(double x, double y, double w, double h);
[Infallible]
void strokeRect(double x, double y, double w, double h); void strokeRect(double x, double y, double w, double h);
// path API (see also CanvasPathMethods) // path API (see also CanvasPathMethods)
[Infallible]
void beginPath(); void beginPath();
[Infallible]
void fill(); void fill();
// NOT IMPLEMENTED void fill(Path path); // NOT IMPLEMENTED void fill(Path path);
[Infallible]
void stroke(); void stroke();
// NOT IMPLEMENTED void stroke(Path path); // NOT IMPLEMENTED void stroke(Path path);
// NOT IMPLEMENTED void drawSystemFocusRing(Element element); // NOT IMPLEMENTED void drawSystemFocusRing(Element element);
@ -90,33 +90,42 @@ interface CanvasRenderingContext2D {
// NOT IMPLEMENTED boolean drawCustomFocusRing(Path path, Element element); // NOT IMPLEMENTED boolean drawCustomFocusRing(Path path, Element element);
// NOT IMPLEMENTED void scrollPathIntoView(); // NOT IMPLEMENTED void scrollPathIntoView();
// NOT IMPLEMENTED void scrollPathIntoView(Path path); // NOT IMPLEMENTED void scrollPathIntoView(Path path);
[Infallible]
void clip(); void clip();
// NOT IMPLEMENTED void clip(Path path); // NOT IMPLEMENTED void clip(Path path);
// NOT IMPLEMENTED void resetClip(); // NOT IMPLEMENTED void resetClip();
[Infallible]
boolean isPointInPath(double x, double y); boolean isPointInPath(double x, double y);
// NOT IMPLEMENTED boolean isPointInPath(Path path, double x, double y); // NOT IMPLEMENTED boolean isPointInPath(Path path, double x, double y);
// text (see also the CanvasDrawingStyles interface) // text (see also the CanvasDrawingStyles interface)
[Throws]
void fillText(DOMString text, double x, double y, optional double maxWidth); void fillText(DOMString text, double x, double y, optional double maxWidth);
[Throws]
void strokeText(DOMString text, double x, double y, optional double maxWidth); void strokeText(DOMString text, double x, double y, optional double maxWidth);
[Throws]
TextMetrics measureText(DOMString text); TextMetrics measureText(DOMString text);
// drawing images // drawing images
// NOT IMPLEMENTED attribute boolean imageSmoothingEnabled; // (default true) // NOT IMPLEMENTED attribute boolean imageSmoothingEnabled; // (default true)
[Throws]
void drawImage((HTMLImageElement or HTMLCanvasElement or HTMLVideoElement) image, double dx, double dy); void drawImage((HTMLImageElement or HTMLCanvasElement or HTMLVideoElement) image, double dx, double dy);
[Throws]
void drawImage((HTMLImageElement or HTMLCanvasElement or HTMLVideoElement) image, double dx, double dy, double dw, double dh); void drawImage((HTMLImageElement or HTMLCanvasElement or HTMLVideoElement) image, double dx, double dy, double dw, double dh);
[Throws]
void drawImage((HTMLImageElement or HTMLCanvasElement or HTMLVideoElement) image, double sx, double sy, double sw, double sh, double dx, double dy, double dw, double dh); void drawImage((HTMLImageElement or HTMLCanvasElement or HTMLVideoElement) image, double sx, double sy, double sw, double sh, double dx, double dy, double dw, double dh);
// hit regions // hit regions
// NOT IMPLEMENTED void addHitRegion(HitRegionOptions options); // NOT IMPLEMENTED void addHitRegion(HitRegionOptions options);
// pixel manipulation // pixel manipulation
[Creator] ImageData createImageData(double sw, double sh); [Creator, Throws]
[Creator] ImageData createImageData(ImageData imagedata); ImageData createImageData(double sw, double sh);
[Creator] ImageData getImageData(double sx, double sy, double sw, double sh); [Creator, Throws]
ImageData createImageData(ImageData imagedata);
[Creator, Throws]
ImageData getImageData(double sx, double sy, double sw, double sh);
[Throws]
void putImageData(ImageData imagedata, double dx, double dy); void putImageData(ImageData imagedata, double dx, double dy);
[Throws]
void putImageData(ImageData imagedata, double dx, double dy, double dirtyX, double dirtyY, double dirtyWidth, double dirtyHeight); void putImageData(ImageData imagedata, double dx, double dy, double dirtyX, double dirtyY, double dirtyWidth, double dirtyHeight);
// Mozilla-specific stuff // Mozilla-specific stuff
@ -192,8 +201,10 @@ interface CanvasRenderingContext2D {
* FIXME Bug 767931 - Mark drawWindow and asyncDrawXULElement as ChromeOnly * FIXME Bug 767931 - Mark drawWindow and asyncDrawXULElement as ChromeOnly
* in WebIDL * in WebIDL
*/ */
[Throws]
void drawWindow(Window window, double x, double y, double w, double h, void drawWindow(Window window, double x, double y, double w, double h,
DOMString bgColor, optional unsigned long flags = 0); DOMString bgColor, optional unsigned long flags = 0);
[Throws]
void asyncDrawXULElement(XULElement elem, double x, double y, double w, void asyncDrawXULElement(XULElement elem, double x, double y, double w,
double h, DOMString bgColor, double h, DOMString bgColor,
optional unsigned long flags = 0); optional unsigned long flags = 0);
@ -230,27 +241,20 @@ interface CanvasDrawingStyles {
[NoInterfaceObject] [NoInterfaceObject]
interface CanvasPathMethods { interface CanvasPathMethods {
// shared path API methods // shared path API methods
[Infallible]
void closePath(); void closePath();
[Infallible]
void moveTo(double x, double y); void moveTo(double x, double y);
[Infallible]
void lineTo(double x, double y); void lineTo(double x, double y);
[Infallible]
void quadraticCurveTo(double cpx, double cpy, double x, double y); void quadraticCurveTo(double cpx, double cpy, double x, double y);
[Infallible]
void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y);
[Throws]
void arcTo(double x1, double y1, double x2, double y2, double radius); void arcTo(double x1, double y1, double x2, double y2, double radius);
// NOT IMPLEMENTED void arcTo(double x1, double y1, double x2, double y2, double radiusX, double radiusY, double rotation); // NOT IMPLEMENTED void arcTo(double x1, double y1, double x2, double y2, double radiusX, double radiusY, double rotation);
[Infallible]
void rect(double x, double y, double w, double h); void rect(double x, double y, double w, double h);
[Throws]
void arc(double x, double y, double radius, double startAngle, double endAngle, optional boolean anticlockwise = false); void arc(double x, double y, double radius, double startAngle, double endAngle, optional boolean anticlockwise = false);
// NOT IMPLEMENTED void ellipse(double x, double y, double radiusX, double radiusY, double rotation, double startAngle, double endAngle, boolean anticlockwise); // NOT IMPLEMENTED void ellipse(double x, double y, double radiusX, double radiusY, double rotation, double startAngle, double endAngle, boolean anticlockwise);
}; };

View File

@ -17,12 +17,15 @@ interface EventTarget {
differs in content and chrome. In content that default boolean differs in content and chrome. In content that default boolean
value is true, while in chrome the default boolean value is value is true, while in chrome the default boolean value is
false. */ false. */
[Throws]
void addEventListener(DOMString type, void addEventListener(DOMString type,
EventListener? listener, EventListener? listener,
optional boolean capture = false, optional boolean capture = false,
optional boolean? wantsUntrusted = null); optional boolean? wantsUntrusted = null);
[Throws]
void removeEventListener(DOMString type, void removeEventListener(DOMString type,
EventListener? listener, EventListener? listener,
optional boolean capture = false); optional boolean capture = false);
[Throws]
boolean dispatchEvent(Event event); boolean dispatchEvent(Event event);
}; };

View File

@ -14,7 +14,6 @@
interface Performance { interface Performance {
// DOMHighResTimeStamp now(); // DOMHighResTimeStamp now();
[Infallible]
double now(); double now();
[Infallible] [Infallible]

View File

@ -481,426 +481,308 @@ interface WebGLRenderingContext {
[Infallible] [Infallible]
readonly attribute long drawingBufferHeight; readonly attribute long drawingBufferHeight;
[WebGLHandlesContextLoss] WebGLContextAttributes getContextAttributes(); [WebGLHandlesContextLoss, Throws] WebGLContextAttributes getContextAttributes();
[WebGLHandlesContextLoss, Infallible] boolean isContextLost(); [WebGLHandlesContextLoss] boolean isContextLost();
[Infallible]
sequence<DOMString>? getSupportedExtensions(); sequence<DOMString>? getSupportedExtensions();
// XXXbz In the spec, this is "object?"; I'm making it // XXXbz In the spec, this is "object?"; I'm making it
// WebGLExtension? just for ease of implementation. // WebGLExtension? just for ease of implementation.
[Infallible]
WebGLExtension? getExtension(DOMString name); WebGLExtension? getExtension(DOMString name);
[Infallible]
void activeTexture(unsigned long texture); void activeTexture(unsigned long texture);
[Infallible]
void attachShader(WebGLProgram? program, WebGLShader? shader); void attachShader(WebGLProgram? program, WebGLShader? shader);
[Infallible]
void bindAttribLocation(WebGLProgram? program, unsigned long index, DOMString name); void bindAttribLocation(WebGLProgram? program, unsigned long index, DOMString name);
[Infallible]
void bindBuffer(unsigned long target, WebGLBuffer? buffer); void bindBuffer(unsigned long target, WebGLBuffer? buffer);
[Infallible]
void bindFramebuffer(unsigned long target, WebGLFramebuffer? framebuffer); void bindFramebuffer(unsigned long target, WebGLFramebuffer? framebuffer);
[Infallible]
void bindRenderbuffer(unsigned long target, WebGLRenderbuffer? renderbuffer); void bindRenderbuffer(unsigned long target, WebGLRenderbuffer? renderbuffer);
[Infallible]
void bindTexture(unsigned long target, WebGLTexture? texture); void bindTexture(unsigned long target, WebGLTexture? texture);
[Infallible]
void blendColor(float red, float green, float blue, float alpha); void blendColor(float red, float green, float blue, float alpha);
[Infallible]
void blendEquation(unsigned long mode); void blendEquation(unsigned long mode);
[Infallible]
void blendEquationSeparate(unsigned long modeRGB, unsigned long modeAlpha); void blendEquationSeparate(unsigned long modeRGB, unsigned long modeAlpha);
[Infallible]
void blendFunc(unsigned long sfactor, unsigned long dfactor); void blendFunc(unsigned long sfactor, unsigned long dfactor);
[Infallible]
void blendFuncSeparate(unsigned long srcRGB, unsigned long dstRGB, void blendFuncSeparate(unsigned long srcRGB, unsigned long dstRGB,
unsigned long srcAlpha, unsigned long dstAlpha); unsigned long srcAlpha, unsigned long dstAlpha);
[Infallible]
void bufferData(unsigned long target, long long size, unsigned long usage); void bufferData(unsigned long target, long long size, unsigned long usage);
[Infallible]
void bufferData(unsigned long target, ArrayBufferView data, unsigned long usage); void bufferData(unsigned long target, ArrayBufferView data, unsigned long usage);
[Infallible]
void bufferData(unsigned long target, ArrayBuffer? data, unsigned long usage); void bufferData(unsigned long target, ArrayBuffer? data, unsigned long usage);
[Infallible]
void bufferSubData(unsigned long target, long long offset, ArrayBufferView data); void bufferSubData(unsigned long target, long long offset, ArrayBufferView data);
[Infallible]
void bufferSubData(unsigned long target, long long offset, ArrayBuffer? data); void bufferSubData(unsigned long target, long long offset, ArrayBuffer? data);
[WebGLHandlesContextLoss, Infallible] [WebGLHandlesContextLoss]
unsigned long checkFramebufferStatus(unsigned long target); unsigned long checkFramebufferStatus(unsigned long target);
[Infallible]
void clear(unsigned long mask); void clear(unsigned long mask);
[Infallible]
void clearColor(float red, float green, float blue, float alpha); void clearColor(float red, float green, float blue, float alpha);
[Infallible]
void clearDepth(float depth); void clearDepth(float depth);
[Infallible]
void clearStencil(long s); void clearStencil(long s);
[Infallible]
void colorMask(boolean red, boolean green, boolean blue, boolean alpha); void colorMask(boolean red, boolean green, boolean blue, boolean alpha);
[Infallible]
void compileShader(WebGLShader? shader); void compileShader(WebGLShader? shader);
[Infallible]
void compressedTexImage2D(unsigned long target, long level, unsigned long internalformat, void compressedTexImage2D(unsigned long target, long level, unsigned long internalformat,
long width, long height, long border, long width, long height, long border,
ArrayBufferView data); ArrayBufferView data);
[Infallible]
void compressedTexSubImage2D(unsigned long target, long level, void compressedTexSubImage2D(unsigned long target, long level,
long xoffset, long yoffset, long xoffset, long yoffset,
long width, long height, unsigned long format, long width, long height, unsigned long format,
ArrayBufferView data); ArrayBufferView data);
[Infallible]
void copyTexImage2D(unsigned long target, long level, unsigned long internalformat, void copyTexImage2D(unsigned long target, long level, unsigned long internalformat,
long x, long y, long width, long height, long x, long y, long width, long height,
long border); long border);
[Infallible]
void copyTexSubImage2D(unsigned long target, long level, long xoffset, long yoffset, void copyTexSubImage2D(unsigned long target, long level, long xoffset, long yoffset,
long x, long y, long width, long height); long x, long y, long width, long height);
[Infallible]
WebGLBuffer? createBuffer(); WebGLBuffer? createBuffer();
[Infallible]
WebGLFramebuffer? createFramebuffer(); WebGLFramebuffer? createFramebuffer();
[Infallible]
WebGLProgram? createProgram(); WebGLProgram? createProgram();
[Infallible]
WebGLRenderbuffer? createRenderbuffer(); WebGLRenderbuffer? createRenderbuffer();
[Infallible]
WebGLShader? createShader(unsigned long type); WebGLShader? createShader(unsigned long type);
[Infallible]
WebGLTexture? createTexture(); WebGLTexture? createTexture();
[Infallible]
void cullFace(unsigned long mode); void cullFace(unsigned long mode);
[Infallible]
void deleteBuffer(WebGLBuffer? buffer); void deleteBuffer(WebGLBuffer? buffer);
[Infallible]
void deleteFramebuffer(WebGLFramebuffer? framebuffer); void deleteFramebuffer(WebGLFramebuffer? framebuffer);
[Infallible]
void deleteProgram(WebGLProgram? program); void deleteProgram(WebGLProgram? program);
[Infallible]
void deleteRenderbuffer(WebGLRenderbuffer? renderbuffer); void deleteRenderbuffer(WebGLRenderbuffer? renderbuffer);
[Infallible]
void deleteShader(WebGLShader? shader); void deleteShader(WebGLShader? shader);
[Infallible]
void deleteTexture(WebGLTexture? texture); void deleteTexture(WebGLTexture? texture);
[Infallible]
void depthFunc(unsigned long func); void depthFunc(unsigned long func);
[Infallible]
void depthMask(boolean flag); void depthMask(boolean flag);
[Infallible]
void depthRange(float zNear, float zFar); void depthRange(float zNear, float zFar);
[Infallible]
void detachShader(WebGLProgram? program, WebGLShader? shader); void detachShader(WebGLProgram? program, WebGLShader? shader);
[Infallible]
void disable(unsigned long cap); void disable(unsigned long cap);
[Infallible]
void disableVertexAttribArray(unsigned long index); void disableVertexAttribArray(unsigned long index);
[Infallible]
void drawArrays(unsigned long mode, long first, long count); void drawArrays(unsigned long mode, long first, long count);
[Infallible]
void drawElements(unsigned long mode, long count, unsigned long type, long long offset); void drawElements(unsigned long mode, long count, unsigned long type, long long offset);
[Infallible]
void enable(unsigned long cap); void enable(unsigned long cap);
[Infallible]
void enableVertexAttribArray(unsigned long index); void enableVertexAttribArray(unsigned long index);
[Infallible]
void finish(); void finish();
[Infallible]
void flush(); void flush();
[Infallible]
void framebufferRenderbuffer(unsigned long target, unsigned long attachment, void framebufferRenderbuffer(unsigned long target, unsigned long attachment,
unsigned long renderbuffertarget, unsigned long renderbuffertarget,
WebGLRenderbuffer? renderbuffer); WebGLRenderbuffer? renderbuffer);
[Infallible]
void framebufferTexture2D(unsigned long target, unsigned long attachment, unsigned long textarget, void framebufferTexture2D(unsigned long target, unsigned long attachment, unsigned long textarget,
WebGLTexture? texture, long level); WebGLTexture? texture, long level);
[Infallible]
void frontFace(unsigned long mode); void frontFace(unsigned long mode);
[Infallible]
void generateMipmap(unsigned long target); void generateMipmap(unsigned long target);
[Infallible]
WebGLActiveInfo? getActiveAttrib(WebGLProgram? program, unsigned long index); WebGLActiveInfo? getActiveAttrib(WebGLProgram? program, unsigned long index);
[Infallible]
WebGLActiveInfo? getActiveUniform(WebGLProgram? program, unsigned long index); WebGLActiveInfo? getActiveUniform(WebGLProgram? program, unsigned long index);
[Infallible]
sequence<WebGLShader>? getAttachedShaders(WebGLProgram? program); sequence<WebGLShader>? getAttachedShaders(WebGLProgram? program);
[WebGLHandlesContextLoss, Infallible] [WebGLHandlesContextLoss]
long getAttribLocation(WebGLProgram? program, DOMString name); long getAttribLocation(WebGLProgram? program, DOMString name);
[Infallible]
any getBufferParameter(unsigned long target, unsigned long pname); any getBufferParameter(unsigned long target, unsigned long pname);
[Throws]
any getParameter(unsigned long pname); any getParameter(unsigned long pname);
[WebGLHandlesContextLoss, Infallible] unsigned long getError(); [WebGLHandlesContextLoss] unsigned long getError();
[Throws]
any getFramebufferAttachmentParameter(unsigned long target, unsigned long attachment, any getFramebufferAttachmentParameter(unsigned long target, unsigned long attachment,
unsigned long pname); unsigned long pname);
[Infallible]
any getProgramParameter(WebGLProgram? program, unsigned long pname); any getProgramParameter(WebGLProgram? program, unsigned long pname);
[Infallible]
DOMString? getProgramInfoLog(WebGLProgram? program); DOMString? getProgramInfoLog(WebGLProgram? program);
[Infallible]
any getRenderbufferParameter(unsigned long target, unsigned long pname); any getRenderbufferParameter(unsigned long target, unsigned long pname);
[Infallible]
any getShaderParameter(WebGLShader? shader, unsigned long pname); any getShaderParameter(WebGLShader? shader, unsigned long pname);
[Infallible]
WebGLShaderPrecisionFormat? getShaderPrecisionFormat(unsigned long shadertype, unsigned long precisiontype); WebGLShaderPrecisionFormat? getShaderPrecisionFormat(unsigned long shadertype, unsigned long precisiontype);
[Infallible]
DOMString? getShaderInfoLog(WebGLShader? shader); DOMString? getShaderInfoLog(WebGLShader? shader);
[Infallible]
DOMString? getShaderSource(WebGLShader? shader); DOMString? getShaderSource(WebGLShader? shader);
[Infallible]
any getTexParameter(unsigned long target, unsigned long pname); any getTexParameter(unsigned long target, unsigned long pname);
[Throws]
any getUniform(WebGLProgram? program, WebGLUniformLocation? location); any getUniform(WebGLProgram? program, WebGLUniformLocation? location);
[Creator, Infallible] [Creator]
WebGLUniformLocation? getUniformLocation(WebGLProgram? program, DOMString name); WebGLUniformLocation? getUniformLocation(WebGLProgram? program, DOMString name);
[Throws]
any getVertexAttrib(unsigned long index, unsigned long pname); any getVertexAttrib(unsigned long index, unsigned long pname);
[WebGLHandlesContextLoss, Infallible] [WebGLHandlesContextLoss]
long long getVertexAttribOffset(unsigned long index, unsigned long pname); long long getVertexAttribOffset(unsigned long index, unsigned long pname);
[Infallible]
void hint(unsigned long target, unsigned long mode); void hint(unsigned long target, unsigned long mode);
[WebGLHandlesContextLoss, Infallible] [WebGLHandlesContextLoss]
boolean isBuffer(WebGLBuffer? buffer); boolean isBuffer(WebGLBuffer? buffer);
[WebGLHandlesContextLoss, Infallible] [WebGLHandlesContextLoss]
boolean isEnabled(unsigned long cap); boolean isEnabled(unsigned long cap);
[WebGLHandlesContextLoss, Infallible] [WebGLHandlesContextLoss]
boolean isFramebuffer(WebGLFramebuffer? framebuffer); boolean isFramebuffer(WebGLFramebuffer? framebuffer);
[WebGLHandlesContextLoss, Infallible] [WebGLHandlesContextLoss]
boolean isProgram(WebGLProgram? program); boolean isProgram(WebGLProgram? program);
[WebGLHandlesContextLoss, Infallible] [WebGLHandlesContextLoss]
boolean isRenderbuffer(WebGLRenderbuffer? renderbuffer); boolean isRenderbuffer(WebGLRenderbuffer? renderbuffer);
[WebGLHandlesContextLoss, Infallible] [WebGLHandlesContextLoss]
boolean isShader(WebGLShader? shader); boolean isShader(WebGLShader? shader);
[WebGLHandlesContextLoss, Infallible] [WebGLHandlesContextLoss]
boolean isTexture(WebGLTexture? texture); boolean isTexture(WebGLTexture? texture);
[Infallible]
void lineWidth(float width); void lineWidth(float width);
[Infallible]
void linkProgram(WebGLProgram? program); void linkProgram(WebGLProgram? program);
[Infallible]
void pixelStorei(unsigned long pname, long param); void pixelStorei(unsigned long pname, long param);
[Infallible]
void polygonOffset(float factor, float units); void polygonOffset(float factor, float units);
[Throws]
void readPixels(long x, long y, long width, long height, void readPixels(long x, long y, long width, long height,
unsigned long format, unsigned long type, ArrayBufferView? pixels); unsigned long format, unsigned long type, ArrayBufferView? pixels);
[Infallible]
void renderbufferStorage(unsigned long target, unsigned long internalformat, void renderbufferStorage(unsigned long target, unsigned long internalformat,
long width, long height); long width, long height);
[Infallible]
void sampleCoverage(float value, boolean invert); void sampleCoverage(float value, boolean invert);
[Infallible]
void scissor(long x, long y, long width, long height); void scissor(long x, long y, long width, long height);
[Infallible]
void shaderSource(WebGLShader? shader, DOMString source); void shaderSource(WebGLShader? shader, DOMString source);
[Infallible]
void stencilFunc(unsigned long func, long ref, unsigned long mask); void stencilFunc(unsigned long func, long ref, unsigned long mask);
[Infallible]
void stencilFuncSeparate(unsigned long face, unsigned long func, long ref, unsigned long mask); void stencilFuncSeparate(unsigned long face, unsigned long func, long ref, unsigned long mask);
[Infallible]
void stencilMask(unsigned long mask); void stencilMask(unsigned long mask);
[Infallible]
void stencilMaskSeparate(unsigned long face, unsigned long mask); void stencilMaskSeparate(unsigned long face, unsigned long mask);
[Infallible]
void stencilOp(unsigned long fail, unsigned long zfail, unsigned long zpass); void stencilOp(unsigned long fail, unsigned long zfail, unsigned long zpass);
[Infallible]
void stencilOpSeparate(unsigned long face, unsigned long fail, unsigned long zfail, unsigned long zpass); void stencilOpSeparate(unsigned long face, unsigned long fail, unsigned long zfail, unsigned long zpass);
[Throws]
void texImage2D(unsigned long target, long level, unsigned long internalformat, void texImage2D(unsigned long target, long level, unsigned long internalformat,
long width, long height, long border, unsigned long format, long width, long height, long border, unsigned long format,
unsigned long type, ArrayBufferView? pixels); unsigned long type, ArrayBufferView? pixels);
[Throws]
void texImage2D(unsigned long target, long level, unsigned long internalformat, void texImage2D(unsigned long target, long level, unsigned long internalformat,
unsigned long format, unsigned long type, ImageData? pixels); unsigned long format, unsigned long type, ImageData? pixels);
[Throws]
void texImage2D(unsigned long target, long level, unsigned long internalformat, void texImage2D(unsigned long target, long level, unsigned long internalformat,
unsigned long format, unsigned long type, HTMLImageElement image); // May throw DOMException unsigned long format, unsigned long type, HTMLImageElement image); // May throw DOMException
[Throws]
void texImage2D(unsigned long target, long level, unsigned long internalformat, void texImage2D(unsigned long target, long level, unsigned long internalformat,
unsigned long format, unsigned long type, HTMLCanvasElement canvas); // May throw DOMException unsigned long format, unsigned long type, HTMLCanvasElement canvas); // May throw DOMException
[Throws]
void texImage2D(unsigned long target, long level, unsigned long internalformat, void texImage2D(unsigned long target, long level, unsigned long internalformat,
unsigned long format, unsigned long type, HTMLVideoElement video); // May throw DOMException unsigned long format, unsigned long type, HTMLVideoElement video); // May throw DOMException
[Infallible]
void texParameterf(unsigned long target, unsigned long pname, float param); void texParameterf(unsigned long target, unsigned long pname, float param);
[Infallible]
void texParameteri(unsigned long target, unsigned long pname, long param); void texParameteri(unsigned long target, unsigned long pname, long param);
[Throws]
void texSubImage2D(unsigned long target, long level, long xoffset, long yoffset, void texSubImage2D(unsigned long target, long level, long xoffset, long yoffset,
long width, long height, long width, long height,
unsigned long format, unsigned long type, ArrayBufferView? pixels); unsigned long format, unsigned long type, ArrayBufferView? pixels);
[Throws]
void texSubImage2D(unsigned long target, long level, long xoffset, long yoffset, void texSubImage2D(unsigned long target, long level, long xoffset, long yoffset,
unsigned long format, unsigned long type, ImageData? pixels); unsigned long format, unsigned long type, ImageData? pixels);
[Throws]
void texSubImage2D(unsigned long target, long level, long xoffset, long yoffset, void texSubImage2D(unsigned long target, long level, long xoffset, long yoffset,
unsigned long format, unsigned long type, HTMLImageElement image); // May throw DOMException unsigned long format, unsigned long type, HTMLImageElement image); // May throw DOMException
[Throws]
void texSubImage2D(unsigned long target, long level, long xoffset, long yoffset, void texSubImage2D(unsigned long target, long level, long xoffset, long yoffset,
unsigned long format, unsigned long type, HTMLCanvasElement canvas); // May throw DOMException unsigned long format, unsigned long type, HTMLCanvasElement canvas); // May throw DOMException
[Throws]
void texSubImage2D(unsigned long target, long level, long xoffset, long yoffset, void texSubImage2D(unsigned long target, long level, long xoffset, long yoffset,
unsigned long format, unsigned long type, HTMLVideoElement video); // May throw DOMException unsigned long format, unsigned long type, HTMLVideoElement video); // May throw DOMException
[Infallible]
void uniform1f(WebGLUniformLocation? location, float x); void uniform1f(WebGLUniformLocation? location, float x);
[Infallible]
void uniform1fv(WebGLUniformLocation? location, Float32Array v); void uniform1fv(WebGLUniformLocation? location, Float32Array v);
[Infallible]
void uniform1fv(WebGLUniformLocation? location, sequence<float> v); void uniform1fv(WebGLUniformLocation? location, sequence<float> v);
[Infallible]
void uniform1i(WebGLUniformLocation? location, long x); void uniform1i(WebGLUniformLocation? location, long x);
[Infallible]
void uniform1iv(WebGLUniformLocation? location, Int32Array v); void uniform1iv(WebGLUniformLocation? location, Int32Array v);
[Infallible]
void uniform1iv(WebGLUniformLocation? location, sequence<long> v); void uniform1iv(WebGLUniformLocation? location, sequence<long> v);
[Infallible]
void uniform2f(WebGLUniformLocation? location, float x, float y); void uniform2f(WebGLUniformLocation? location, float x, float y);
[Infallible]
void uniform2fv(WebGLUniformLocation? location, Float32Array v); void uniform2fv(WebGLUniformLocation? location, Float32Array v);
[Infallible]
void uniform2fv(WebGLUniformLocation? location, sequence<float> v); void uniform2fv(WebGLUniformLocation? location, sequence<float> v);
[Infallible]
void uniform2i(WebGLUniformLocation? location, long x, long y); void uniform2i(WebGLUniformLocation? location, long x, long y);
[Infallible]
void uniform2iv(WebGLUniformLocation? location, Int32Array v); void uniform2iv(WebGLUniformLocation? location, Int32Array v);
[Infallible]
void uniform2iv(WebGLUniformLocation? location, sequence<long> v); void uniform2iv(WebGLUniformLocation? location, sequence<long> v);
[Infallible]
void uniform3f(WebGLUniformLocation? location, float x, float y, float z); void uniform3f(WebGLUniformLocation? location, float x, float y, float z);
[Infallible]
void uniform3fv(WebGLUniformLocation? location, Float32Array v); void uniform3fv(WebGLUniformLocation? location, Float32Array v);
[Infallible]
void uniform3fv(WebGLUniformLocation? location, sequence<float> v); void uniform3fv(WebGLUniformLocation? location, sequence<float> v);
[Infallible]
void uniform3i(WebGLUniformLocation? location, long x, long y, long z); void uniform3i(WebGLUniformLocation? location, long x, long y, long z);
[Infallible]
void uniform3iv(WebGLUniformLocation? location, Int32Array v); void uniform3iv(WebGLUniformLocation? location, Int32Array v);
[Infallible]
void uniform3iv(WebGLUniformLocation? location, sequence<long> v); void uniform3iv(WebGLUniformLocation? location, sequence<long> v);
[Infallible]
void uniform4f(WebGLUniformLocation? location, float x, float y, float z, float w); void uniform4f(WebGLUniformLocation? location, float x, float y, float z, float w);
[Infallible]
void uniform4fv(WebGLUniformLocation? location, Float32Array v); void uniform4fv(WebGLUniformLocation? location, Float32Array v);
[Infallible]
void uniform4fv(WebGLUniformLocation? location, sequence<float> v); void uniform4fv(WebGLUniformLocation? location, sequence<float> v);
[Infallible]
void uniform4i(WebGLUniformLocation? location, long x, long y, long z, long w); void uniform4i(WebGLUniformLocation? location, long x, long y, long z, long w);
[Infallible]
void uniform4iv(WebGLUniformLocation? location, Int32Array v); void uniform4iv(WebGLUniformLocation? location, Int32Array v);
[Infallible]
void uniform4iv(WebGLUniformLocation? location, sequence<long> v); void uniform4iv(WebGLUniformLocation? location, sequence<long> v);
[Infallible]
void uniformMatrix2fv(WebGLUniformLocation? location, boolean transpose, void uniformMatrix2fv(WebGLUniformLocation? location, boolean transpose,
Float32Array value); Float32Array value);
[Infallible]
void uniformMatrix2fv(WebGLUniformLocation? location, boolean transpose, void uniformMatrix2fv(WebGLUniformLocation? location, boolean transpose,
sequence<float> value); sequence<float> value);
[Infallible]
void uniformMatrix3fv(WebGLUniformLocation? location, boolean transpose, void uniformMatrix3fv(WebGLUniformLocation? location, boolean transpose,
Float32Array value); Float32Array value);
[Infallible]
void uniformMatrix3fv(WebGLUniformLocation? location, boolean transpose, void uniformMatrix3fv(WebGLUniformLocation? location, boolean transpose,
sequence<float> value); sequence<float> value);
[Infallible]
void uniformMatrix4fv(WebGLUniformLocation? location, boolean transpose, void uniformMatrix4fv(WebGLUniformLocation? location, boolean transpose,
Float32Array value); Float32Array value);
[Infallible]
void uniformMatrix4fv(WebGLUniformLocation? location, boolean transpose, void uniformMatrix4fv(WebGLUniformLocation? location, boolean transpose,
sequence<float> value); sequence<float> value);
[Infallible]
void useProgram(WebGLProgram? program); void useProgram(WebGLProgram? program);
[Infallible]
void validateProgram(WebGLProgram? program); void validateProgram(WebGLProgram? program);
[Infallible]
void vertexAttrib1f(unsigned long indx, float x); void vertexAttrib1f(unsigned long indx, float x);
[Infallible]
void vertexAttrib1fv(unsigned long indx, Float32Array values); void vertexAttrib1fv(unsigned long indx, Float32Array values);
[Infallible]
void vertexAttrib1fv(unsigned long indx, sequence<float> values); void vertexAttrib1fv(unsigned long indx, sequence<float> values);
[Infallible]
void vertexAttrib2f(unsigned long indx, float x, float y); void vertexAttrib2f(unsigned long indx, float x, float y);
[Infallible]
void vertexAttrib2fv(unsigned long indx, Float32Array values); void vertexAttrib2fv(unsigned long indx, Float32Array values);
[Infallible]
void vertexAttrib2fv(unsigned long indx, sequence<float> values); void vertexAttrib2fv(unsigned long indx, sequence<float> values);
[Infallible]
void vertexAttrib3f(unsigned long indx, float x, float y, float z); void vertexAttrib3f(unsigned long indx, float x, float y, float z);
[Infallible]
void vertexAttrib3fv(unsigned long indx, Float32Array values); void vertexAttrib3fv(unsigned long indx, Float32Array values);
[Infallible]
void vertexAttrib3fv(unsigned long indx, sequence<float> values); void vertexAttrib3fv(unsigned long indx, sequence<float> values);
[Infallible]
void vertexAttrib4f(unsigned long indx, float x, float y, float z, float w); void vertexAttrib4f(unsigned long indx, float x, float y, float z, float w);
[Infallible]
void vertexAttrib4fv(unsigned long indx, Float32Array values); void vertexAttrib4fv(unsigned long indx, Float32Array values);
[Infallible]
void vertexAttrib4fv(unsigned long indx, sequence<float> values); void vertexAttrib4fv(unsigned long indx, sequence<float> values);
[Infallible]
void vertexAttribPointer(unsigned long indx, long size, unsigned long type, void vertexAttribPointer(unsigned long indx, long size, unsigned long type,
boolean normalized, long stride, long long offset); boolean normalized, long stride, long long offset);
[Infallible]
void viewport(long x, long y, long width, long height); void viewport(long x, long y, long width, long height);
}; };

View File

@ -68,8 +68,10 @@ interface XMLHttpRequest : XMLHttpRequestEventTarget {
readonly attribute unsigned short readyState; readonly attribute unsigned short readyState;
// request // request
[Throws]
void open(DOMString method, DOMString url, optional boolean async = true, void open(DOMString method, DOMString url, optional boolean async = true,
optional DOMString? user, optional DOMString? password); optional DOMString? user, optional DOMString? password);
[Throws]
void setRequestHeader(DOMString header, DOMString value); void setRequestHeader(DOMString header, DOMString value);
[GetterInfallible] [GetterInfallible]
@ -81,15 +83,22 @@ interface XMLHttpRequest : XMLHttpRequestEventTarget {
[Infallible=MainThread] [Infallible=MainThread]
readonly attribute XMLHttpRequestUpload upload; readonly attribute XMLHttpRequestUpload upload;
[Throws]
void send(); void send();
[Throws]
void send(ArrayBuffer data); void send(ArrayBuffer data);
[Throws]
void send(Blob data); void send(Blob data);
[Throws]
void send(Document data); void send(Document data);
[Throws]
void send(DOMString? data); void send(DOMString? data);
[Throws]
void send(FormData data); void send(FormData data);
[Throws]
void send(InputStream data); void send(InputStream data);
[Infallible=MainThread] [Throws=Workers]
void abort(); void abort();
// response // response
@ -98,12 +107,13 @@ interface XMLHttpRequest : XMLHttpRequestEventTarget {
[Infallible] [Infallible]
readonly attribute DOMString statusText; readonly attribute DOMString statusText;
[Throws]
DOMString? getResponseHeader(DOMString header); DOMString? getResponseHeader(DOMString header);
[Infallible=MainThread] [Throws=Workers]
DOMString getAllResponseHeaders(); DOMString getAllResponseHeaders();
[Infallible=MainThread] [Throws=Workers]
void overrideMimeType(DOMString mime); void overrideMimeType(DOMString mime);
[GetterInfallible] [GetterInfallible]
@ -124,7 +134,9 @@ interface XMLHttpRequest : XMLHttpRequestEventTarget {
[ChromeOnly, GetterInfallible] [ChromeOnly, GetterInfallible]
readonly attribute MozChannel channel; readonly attribute MozChannel channel;
[Throws]
void sendAsBinary(DOMString body); void sendAsBinary(DOMString body);
[Throws]
any getInterface(IID iid); any getInterface(IID iid);
[Infallible] [Infallible]