Bug 809260. Example codegen should include ErrorResult.h in the header. r=mccr8

This commit is contained in:
Boris Zbarsky 2012-11-09 08:24:32 -08:00
parent 03231584a7
commit 722d581206
4 changed files with 17 additions and 1 deletions

View File

@ -7273,7 +7273,8 @@ class CGExampleRoot(CGThing):
self.root = CGHeaders([], [], [],
[ "nsWrapperCache.h",
"nsCycleCollectionParticipant.h",
"mozilla/Attributes.h" ],
"mozilla/Attributes.h",
"mozilla/ErrorResult.h" ],
[ "%s.h" % interfaceName,
"mozilla/dom/%sBinding.h" % interfaceName,
"nsContentUtils.h" ], self.root);

View File

@ -444,6 +444,13 @@ public:
TestInterface* PutForwardsAttr();
TestInterface* PutForwardsAttr2();
TestInterface* PutForwardsAttr3();
void ThrowingMethod(ErrorResult& aRv);
bool GetThrowingAttr(ErrorResult& aRv) const;
void SetThrowingAttr(bool arg, ErrorResult& aRv);
bool GetThrowingGetterAttr(ErrorResult& aRv) const;
void SetThrowingGetterAttr(bool arg);
bool ThrowingSetterAttr() const;
void SetThrowingSetterAttr(bool arg, ErrorResult& aRv);
// Methods and properties imported via "implements"
bool ImplementedProperty();

View File

@ -397,6 +397,10 @@ interface TestInterface {
[PutForwards=writableByte] readonly attribute TestInterface putForwardsAttr;
[PutForwards=writableByte, LenientThis] readonly attribute TestInterface putForwardsAttr2;
[PutForwards=writableByte, ChromeOnly] readonly attribute TestInterface putForwardsAttr3;
[Throws] void throwingMethod();
[Throws] attribute boolean throwingAttr;
[GetterThrows] attribute boolean throwingGetterAttr;
[SetterThrows] attribute boolean throwingSetterAttr;
// If you add things here, add them to TestExampleGen as well
};

View File

@ -316,6 +316,10 @@ interface TestExampleInterface {
[PutForwards=writableByte] readonly attribute TestExampleInterface putForwardsAttr;
[PutForwards=writableByte, LenientThis] readonly attribute TestExampleInterface putForwardsAttr2;
[PutForwards=writableByte, ChromeOnly] readonly attribute TestExampleInterface putForwardsAttr3;
[Throws] void throwingMethod();
[Throws] attribute boolean throwingAttr;
[GetterThrows] attribute boolean throwingGetterAttr;
[SetterThrows] attribute boolean throwingSetterAttr;
// If you add things here, add them to TestCodeGen as well
};