зеркало из https://github.com/mozilla/gecko-dev.git
Bug 942631 part 4. Allow WebIDL attributes to return a sequence if it's cached. r=peterv
This commit is contained in:
Родитель
a55415242a
Коммит
be8f33b2af
|
@ -2652,9 +2652,9 @@ class IDLAttribute(IDLInterfaceMember):
|
|||
if self.type.isDictionary():
|
||||
raise WebIDLError("An attribute cannot be of a dictionary type",
|
||||
[self.location])
|
||||
if self.type.isSequence():
|
||||
raise WebIDLError("An attribute cannot be of a sequence type",
|
||||
[self.location])
|
||||
if self.type.isSequence() and not self.getExtendedAttribute("Cached"):
|
||||
raise WebIDLError("A non-cached attribute cannot be of a sequence "
|
||||
"type", [self.location])
|
||||
if self.type.isUnion():
|
||||
for f in self.type.unroll().flatMemberTypes:
|
||||
if f.isDictionary():
|
||||
|
|
|
@ -340,6 +340,7 @@ public:
|
|||
void PassConsequentialInterface(IndirectlyImplementedInterface&);
|
||||
|
||||
// Sequence types
|
||||
void GetReadonlySequence(nsTArray<int32_t>&);
|
||||
void ReceiveSequence(nsTArray<int32_t>&);
|
||||
void ReceiveNullableSequence(Nullable< nsTArray<int32_t> >&);
|
||||
void ReceiveSequenceOfNullableInts(nsTArray< Nullable<int32_t> >&);
|
||||
|
|
|
@ -295,6 +295,8 @@ interface TestInterface {
|
|||
void passConsequentialInterface(IndirectlyImplementedInterface arg);
|
||||
|
||||
// Sequence types
|
||||
[Cached, Pure]
|
||||
readonly attribute sequence<long> readonlySequence;
|
||||
sequence<long> receiveSequence();
|
||||
sequence<long>? receiveNullableSequence();
|
||||
sequence<long?> receiveSequenceOfNullableInts();
|
||||
|
|
|
@ -191,6 +191,8 @@ interface TestExampleInterface {
|
|||
void passConsequentialInterface(IndirectlyImplementedInterface arg);
|
||||
|
||||
// Sequence types
|
||||
[Cached, Pure]
|
||||
readonly attribute sequence<long> readonlySequence;
|
||||
sequence<long> receiveSequence();
|
||||
sequence<long>? receiveNullableSequence();
|
||||
sequence<long?> receiveSequenceOfNullableInts();
|
||||
|
|
|
@ -212,6 +212,8 @@ interface TestJSImplInterface {
|
|||
void passConsequentialInterface(IndirectlyImplementedInterface arg);
|
||||
|
||||
// Sequence types
|
||||
[Cached, Pure]
|
||||
readonly attribute sequence<long> readonlySequence;
|
||||
sequence<long> receiveSequence();
|
||||
sequence<long>? receiveNullableSequence();
|
||||
sequence<long?> receiveSequenceOfNullableInts();
|
||||
|
|
Загрузка…
Ссылка в новой задаче