From e32a66ebb34a188c3ad5ecd888a987a8c11509bb Mon Sep 17 00:00:00 2001 From: Andrew McCreight Date: Wed, 20 May 2015 09:55:07 -0700 Subject: [PATCH] Bug 1166488 - Eliminate ServiceWorkerRegistrationBase::mCCDummy. r=smaug --- dom/workers/ServiceWorkerRegistration.cpp | 3 --- dom/workers/ServiceWorkerRegistration.h | 8 ++------ xpcom/glue/nsCycleCollectionParticipant.h | 4 ++++ 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/dom/workers/ServiceWorkerRegistration.cpp b/dom/workers/ServiceWorkerRegistration.cpp index 3023974200f8..38abc5633b7d 100644 --- a/dom/workers/ServiceWorkerRegistration.cpp +++ b/dom/workers/ServiceWorkerRegistration.cpp @@ -53,9 +53,6 @@ NS_IMPL_RELEASE_INHERITED(ServiceWorkerRegistrationBase, DOMEventTargetHelper) NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(ServiceWorkerRegistrationBase) NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper) -NS_IMPL_CYCLE_COLLECTION_INHERITED(ServiceWorkerRegistrationBase, - DOMEventTargetHelper, mCCDummy); - ServiceWorkerRegistrationBase::ServiceWorkerRegistrationBase(nsPIDOMWindow* aWindow, const nsAString& aScope) : DOMEventTargetHelper(aWindow) diff --git a/dom/workers/ServiceWorkerRegistration.h b/dom/workers/ServiceWorkerRegistration.h index 1dc2fb7bce58..2ef61b86df1e 100644 --- a/dom/workers/ServiceWorkerRegistration.h +++ b/dom/workers/ServiceWorkerRegistration.h @@ -66,8 +66,6 @@ class ServiceWorkerRegistrationBase : public DOMEventTargetHelper { public: NS_DECL_ISUPPORTS_INHERITED - NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(ServiceWorkerRegistrationBase, - DOMEventTargetHelper) IMPL_EVENT_HANDLER(updatefound) @@ -91,8 +89,6 @@ protected: { } const nsString mScope; -private: - nsCOMPtr mCCDummy; }; class ServiceWorkerRegistrationMainThread final : public ServiceWorkerRegistrationBase, @@ -120,10 +116,10 @@ public: already_AddRefed GetWaiting() override; - + already_AddRefed GetActive() override; - + already_AddRefed GetPushManager(ErrorResult& aRv); diff --git a/xpcom/glue/nsCycleCollectionParticipant.h b/xpcom/glue/nsCycleCollectionParticipant.h index 128cf0138c76..e20094665860 100644 --- a/xpcom/glue/nsCycleCollectionParticipant.h +++ b/xpcom/glue/nsCycleCollectionParticipant.h @@ -825,6 +825,10 @@ static NS_CYCLE_COLLECTION_INNERCLASS NS_CYCLE_COLLECTION_INNERNAME; NS_IMPL_CYCLE_COLLECTION_TRAVERSE(__VA_ARGS__) \ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END +// If you are looking for NS_IMPL_CYCLE_COLLECTION_INHERITED_0(_class, _base) +// you should instead not declare any cycle collected stuff in _class, so it +// will just inherit the CC declarations from _base. + #define NS_IMPL_CYCLE_COLLECTION_INHERITED(_class, _base, ...) \ NS_IMPL_CYCLE_COLLECTION_CLASS(_class) \ NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(_class, _base) \