mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 931285, part 2 - Implement a cycle collected version of nsHashPropertyBag and use it from JS. r=froydnj
This commit is contained in:
parent
623aaaa7d9
commit
01d312c5b8
@ -63,7 +63,7 @@
|
||||
COMPONENT(VARIANT, nsVariantConstructor)
|
||||
COMPONENT(INTERFACEINFOMANAGER_SERVICE, nsXPTIInterfaceInfoManagerGetSingleton)
|
||||
|
||||
COMPONENT(HASH_PROPERTY_BAG, nsHashPropertyBagConstructor)
|
||||
COMPONENT(HASH_PROPERTY_BAG, nsHashPropertyBagCCConstructor)
|
||||
|
||||
COMPONENT(UUID_GENERATOR, nsUUIDGeneratorConstructor)
|
||||
|
||||
|
@ -215,7 +215,7 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(VisualEventTracer)
|
||||
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsVariant)
|
||||
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsHashPropertyBag)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsHashPropertyBagCC)
|
||||
|
||||
NS_GENERIC_AGGREGATED_CONSTRUCTOR(nsProperties)
|
||||
|
||||
|
@ -271,3 +271,21 @@ NS_INTERFACE_MAP_BEGIN(nsHashPropertyBag)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIPropertyBag2)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIWritablePropertyBag2)
|
||||
NS_INTERFACE_MAP_END
|
||||
|
||||
|
||||
/*
|
||||
* nsHashPropertyBagCC implementation.
|
||||
*/
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION(nsHashPropertyBagCC, mPropertyHash)
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTING_ADDREF(nsHashPropertyBagCC)
|
||||
NS_IMPL_CYCLE_COLLECTING_RELEASE(nsHashPropertyBagCC)
|
||||
|
||||
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsHashPropertyBagCC)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIWritablePropertyBag)
|
||||
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsIPropertyBag, nsIWritablePropertyBag)
|
||||
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIWritablePropertyBag)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIPropertyBag2)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIWritablePropertyBag2)
|
||||
NS_INTERFACE_MAP_END
|
||||
|
@ -10,6 +10,8 @@
|
||||
#include "nsIVariant.h"
|
||||
#include "nsIWritablePropertyBag.h"
|
||||
#include "nsIWritablePropertyBag2.h"
|
||||
|
||||
#include "nsCycleCollectionParticipant.h"
|
||||
#include "nsInterfaceHashtable.h"
|
||||
|
||||
class nsHashPropertyBagBase
|
||||
@ -40,4 +42,16 @@ protected:
|
||||
virtual ~nsHashPropertyBag() {}
|
||||
};
|
||||
|
||||
/* A cycle collected nsHashPropertyBag for main-thread-only use. */
|
||||
class nsHashPropertyBagCC MOZ_FINAL : public nsHashPropertyBagBase
|
||||
{
|
||||
public:
|
||||
nsHashPropertyBagCC() {}
|
||||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||
NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(nsHashPropertyBagCC,
|
||||
nsIWritablePropertyBag)
|
||||
protected:
|
||||
virtual ~nsHashPropertyBagCC() {}
|
||||
};
|
||||
|
||||
#endif /* nsHashPropertyBag_h___ */
|
||||
|
Loading…
Reference in New Issue
Block a user