Fix for bug 696817 - Cycle-collect nsDOMWindowUtils. r=jst.

--HG--
extra : rebase_source : d85456750c86290cec8debc9b369a8d6136b4356
This commit is contained in:
Peter Van der Beken 2010-11-08 15:50:44 +01:00
parent 1e2103bad7
commit 90134bd7d4
2 changed files with 15 additions and 4 deletions

View File

@ -99,15 +99,24 @@ static bool IsUniversalXPConnectCapable()
DOMCI_DATA(WindowUtils, nsDOMWindowUtils)
NS_INTERFACE_MAP_BEGIN(nsDOMWindowUtils)
NS_IMPL_CYCLE_COLLECTION_CLASS(nsDOMWindowUtils)
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(nsDOMWindowUtils)
NS_IMPL_CYCLE_COLLECTION_UNLINK_NSCOMPTR(mWindow)
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(nsDOMWindowUtils)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_NSCOMPTR_AMBIGUOUS(mWindow,
nsIScriptGlobalObject)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsDOMWindowUtils)
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIDOMWindowUtils)
NS_INTERFACE_MAP_ENTRY(nsIDOMWindowUtils)
NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference)
NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(WindowUtils)
NS_INTERFACE_MAP_END
NS_IMPL_ADDREF(nsDOMWindowUtils)
NS_IMPL_RELEASE(nsDOMWindowUtils)
NS_IMPL_CYCLE_COLLECTING_ADDREF(nsDOMWindowUtils)
NS_IMPL_CYCLE_COLLECTING_RELEASE(nsDOMWindowUtils)
nsDOMWindowUtils::nsDOMWindowUtils(nsGlobalWindow *aWindow)
: mWindow(aWindow)

View File

@ -49,7 +49,9 @@ class nsDOMWindowUtils : public nsIDOMWindowUtils,
public:
nsDOMWindowUtils(nsGlobalWindow *aWindow);
~nsDOMWindowUtils();
NS_DECL_ISUPPORTS
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(nsDOMWindowUtils,
nsIDOMWindowUtils)
NS_DECL_NSIDOMWINDOWUTILS
protected: