diff --git a/content/xslt/src/xpath/nsXPathExpression.cpp b/content/xslt/src/xpath/nsXPathExpression.cpp index ddc4cbc16c5..21c39e78958 100644 --- a/content/xslt/src/xpath/nsXPathExpression.cpp +++ b/content/xslt/src/xpath/nsXPathExpression.cpp @@ -49,9 +49,13 @@ #include "txURIUtils.h" #include "txXPathTreeWalker.h" -NS_IMPL_ADDREF(nsXPathExpression) -NS_IMPL_RELEASE(nsXPathExpression) -NS_INTERFACE_MAP_BEGIN(nsXPathExpression) +NS_IMPL_CYCLE_COLLECTION_1(nsXPathExpression, mDocument) + +NS_IMPL_CYCLE_COLLECTING_ADDREF_AMBIGUOUS(nsXPathExpression, + nsIDOMXPathExpression) +NS_IMPL_CYCLE_COLLECTING_RELEASE_AMBIGUOUS(nsXPathExpression, + nsIDOMXPathExpression) +NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsXPathExpression) NS_INTERFACE_MAP_ENTRY(nsIDOMXPathExpression) NS_INTERFACE_MAP_ENTRY(nsIDOMNSXPathExpression) NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIDOMXPathExpression) diff --git a/content/xslt/src/xpath/nsXPathExpression.h b/content/xslt/src/xpath/nsXPathExpression.h index e1b29cae779..7eeef3e8694 100644 --- a/content/xslt/src/xpath/nsXPathExpression.h +++ b/content/xslt/src/xpath/nsXPathExpression.h @@ -44,6 +44,7 @@ #include "txIXPathContext.h" #include "txResultRecycler.h" #include "nsAutoPtr.h" +#include "nsCycleCollectionParticipant.h" class Expr; class txXPathNode; @@ -59,7 +60,9 @@ public: nsIDOMDocument *aDocument); // nsISupports interface - NS_DECL_ISUPPORTS + NS_DECL_CYCLE_COLLECTING_ISUPPORTS + NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(nsXPathExpression, + nsIDOMXPathExpression) // nsIDOMXPathExpression interface NS_DECL_NSIDOMXPATHEXPRESSION diff --git a/content/xslt/src/xpath/nsXPathNSResolver.cpp b/content/xslt/src/xpath/nsXPathNSResolver.cpp index 8fee8ae7068..a8740c4db20 100644 --- a/content/xslt/src/xpath/nsXPathNSResolver.cpp +++ b/content/xslt/src/xpath/nsXPathNSResolver.cpp @@ -41,9 +41,11 @@ #include "nsDOMString.h" #include "nsContentUtils.h" -NS_IMPL_ADDREF(nsXPathNSResolver) -NS_IMPL_RELEASE(nsXPathNSResolver) -NS_INTERFACE_MAP_BEGIN(nsXPathNSResolver) +NS_IMPL_CYCLE_COLLECTION_1(nsXPathNSResolver, mNode) + +NS_IMPL_CYCLE_COLLECTING_ADDREF(nsXPathNSResolver) +NS_IMPL_CYCLE_COLLECTING_RELEASE(nsXPathNSResolver) +NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsXPathNSResolver) NS_INTERFACE_MAP_ENTRY(nsIDOMXPathNSResolver) NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIDOMXPathNSResolver) NS_INTERFACE_MAP_ENTRY_CONTENT_CLASSINFO(XPathNSResolver) diff --git a/content/xslt/src/xpath/nsXPathNSResolver.h b/content/xslt/src/xpath/nsXPathNSResolver.h index 14004d856b2..6756643c613 100644 --- a/content/xslt/src/xpath/nsXPathNSResolver.h +++ b/content/xslt/src/xpath/nsXPathNSResolver.h @@ -43,6 +43,7 @@ #include "nsIDOMNode.h" #include "nsIDOM3Node.h" #include "nsCOMPtr.h" +#include "nsCycleCollectionParticipant.h" /** * A class for evaluating an XPath expression string @@ -53,7 +54,8 @@ public: nsXPathNSResolver(nsIDOMNode* aNode); // nsISupports interface - NS_DECL_ISUPPORTS + NS_DECL_CYCLE_COLLECTING_ISUPPORTS + NS_DECL_CYCLE_COLLECTION_CLASS(nsXPathNSResolver) // nsIDOMXPathNSResolver interface NS_DECL_NSIDOMXPATHNSRESOLVER