mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-26 12:20:56 +00:00
Bug 931283, part 2 - Split out nsVariant into a subclass. r=froydnj
This commit is contained in:
parent
747f1dd47c
commit
642c4344e2
@ -1667,8 +1667,6 @@ nsDiscriminatedUnion::Traverse(nsCycleCollectionTraversalCallback& aCb) const
|
||||
/***************************************************************************/
|
||||
// members...
|
||||
|
||||
NS_IMPL_ISUPPORTS(nsVariantBase, nsIVariant, nsIWritableVariant)
|
||||
|
||||
nsVariantBase::nsVariantBase()
|
||||
: mWritable(true)
|
||||
{
|
||||
@ -2176,3 +2174,7 @@ nsVariantBase::SetFromVariant(nsIVariant* aValue)
|
||||
}
|
||||
return mData.SetFromVariant(aValue);
|
||||
}
|
||||
|
||||
/* nsVariant implementation */
|
||||
|
||||
NS_IMPL_ISUPPORTS(nsVariant, nsIVariant, nsIWritableVariant)
|
||||
|
@ -174,24 +174,31 @@ public:
|
||||
*
|
||||
* nsIVariant users won't usually need to see this class.
|
||||
*/
|
||||
class nsVariantBase final : public nsIWritableVariant
|
||||
class nsVariantBase : public nsIWritableVariant
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIVARIANT
|
||||
NS_DECL_NSIWRITABLEVARIANT
|
||||
|
||||
nsVariantBase();
|
||||
|
||||
private:
|
||||
protected:
|
||||
~nsVariantBase() {};
|
||||
|
||||
protected:
|
||||
nsDiscriminatedUnion mData;
|
||||
bool mWritable;
|
||||
};
|
||||
|
||||
typedef nsVariantBase nsVariant;
|
||||
class nsVariant final : public nsVariantBase
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
nsVariant() {};
|
||||
|
||||
private:
|
||||
~nsVariant() {};
|
||||
};
|
||||
|
||||
/**
|
||||
* Users of nsIVariant should be using the contractID and not this CID.
|
||||
|
Loading…
x
Reference in New Issue
Block a user