mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-27 21:00:50 +00:00
bug 824970 - wrapper cache and cycle collect nsDOMCSSRect r=bz
This commit is contained in:
parent
5463ba3e5b
commit
9f1189019d
@ -27,15 +27,17 @@ nsDOMCSSRect::~nsDOMCSSRect(void)
|
||||
DOMCI_DATA(CSSRect, nsDOMCSSRect)
|
||||
|
||||
// QueryInterface implementation for nsCSSRect
|
||||
NS_INTERFACE_MAP_BEGIN(nsDOMCSSRect)
|
||||
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsDOMCSSRect)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIDOMRect)
|
||||
NS_INTERFACE_MAP_ENTRY(nsISupports)
|
||||
NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(CSSRect)
|
||||
NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
|
||||
NS_INTERFACE_MAP_END
|
||||
|
||||
NS_IMPL_ADDREF(nsDOMCSSRect)
|
||||
NS_IMPL_RELEASE(nsDOMCSSRect)
|
||||
NS_IMPL_CYCLE_COLLECTING_ADDREF(nsDOMCSSRect)
|
||||
NS_IMPL_CYCLE_COLLECTING_RELEASE(nsDOMCSSRect)
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE_4(nsDOMCSSRect, mTop, mBottom, mLeft, mRight)
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDOMCSSRect::GetTop(nsIDOMCSSPrimitiveValue** aTop)
|
||||
|
@ -10,11 +10,15 @@
|
||||
|
||||
#include "nsISupports.h"
|
||||
#include "nsIDOMRect.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsAutoPtr.h"
|
||||
#include "nsCycleCollectionParticipant.h"
|
||||
#include "nsWrapperCache.h"
|
||||
|
||||
class nsROCSSPrimitiveValue;
|
||||
|
||||
class nsDOMCSSRect : public nsIDOMRect {
|
||||
class nsDOMCSSRect : public nsIDOMRect,
|
||||
public nsWrapperCache
|
||||
{
|
||||
public:
|
||||
nsDOMCSSRect(nsROCSSPrimitiveValue* aTop,
|
||||
nsROCSSPrimitiveValue* aRight,
|
||||
@ -22,9 +26,11 @@ public:
|
||||
nsROCSSPrimitiveValue* aLeft);
|
||||
virtual ~nsDOMCSSRect(void);
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||
NS_DECL_NSIDOMRECT
|
||||
|
||||
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(nsDOMCSSRect)
|
||||
|
||||
private:
|
||||
nsRefPtr<nsROCSSPrimitiveValue> mTop;
|
||||
nsRefPtr<nsROCSSPrimitiveValue> mRight;
|
||||
|
Loading…
x
Reference in New Issue
Block a user