Bug 900903 - Part 2: Change uses of numbered macros in nsCycleCollectionParticipant.h to the variadic variants. r=smaug
authorBirunthan Mohanathas <birunthan@mohanathas.com>
Fri, 25 Apr 2014 12:49:00 -0400
changeset 180435 a9a093d2881a59be843a506b15ee6841facddae3
parent 180434 bd96c9f1264c9a5f5b41cf3ef9ad7e6fb8895697
child 180436 9baacd7d775fb7d973781b0943ffdb00cc3a358a
push id26663
push userryanvm@gmail.com
push dateSun, 27 Apr 2014 01:52:51 +0000
treeherdermozilla-central@fcf19894d9f3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs900903
milestone31.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 900903 - Part 2: Change uses of numbered macros in nsCycleCollectionParticipant.h to the variadic variants. r=smaug
accessible/src/base/AccEvent.cpp
accessible/src/base/NotificationController.cpp
accessible/src/base/nsAccessiblePivot.cpp
accessible/src/generic/Accessible.cpp
accessible/src/xpcom/AccEventGen.py
accessible/src/xpcom/xpcAccessibleTextRange.cpp
accessible/src/xul/XULTreeAccessible.cpp
accessible/src/xul/XULTreeGridAccessible.cpp
content/base/src/DOMQuad.cpp
content/base/src/EventSource.cpp
content/base/src/FragmentOrElement.cpp
content/base/src/ShadowRoot.cpp
content/base/src/TreeWalker.cpp
content/base/src/nsContentIterator.cpp
content/base/src/nsContentList.cpp
content/base/src/nsDocumentEncoder.cpp
content/base/src/nsFrameLoader.cpp
content/base/src/nsInProcessTabChildGlobal.cpp
content/base/src/nsObjectLoadingContent.cpp
content/base/src/nsXMLHttpRequest.cpp
content/canvas/src/WebGLUniformLocation.cpp
content/html/content/src/HTMLButtonElement.cpp
content/html/content/src/HTMLCanvasElement.cpp
content/html/content/src/HTMLContentElement.cpp
content/html/content/src/HTMLDataListElement.cpp
content/html/content/src/HTMLFieldSetElement.cpp
content/html/content/src/HTMLPropertiesCollection.cpp
content/html/content/src/HTMLTextAreaElement.cpp
content/html/content/src/HTMLTrackElement.cpp
content/html/content/src/TextTrackManager.cpp
content/html/content/src/UndoManager.cpp
content/html/content/src/nsGenericHTMLElement.cpp
content/html/content/src/nsTextEditorState.cpp
content/html/document/src/ImageDocument.cpp
content/html/document/src/PluginDocument.cpp
content/html/document/src/nsHTMLDocument.cpp
content/media/DOMMediaStream.cpp
content/media/MediaRecorder.cpp
content/media/MediaStreamTrack.cpp
content/media/TextTrack.cpp
content/media/TextTrackCue.cpp
content/media/TextTrackList.cpp
content/media/WebVTTListener.cpp
content/media/mediasource/MediaSource.cpp
content/media/mediasource/SourceBuffer.cpp
content/media/mediasource/SourceBufferList.cpp
content/media/webaudio/AudioDestinationNode.cpp
content/media/webaudio/AudioProcessingEvent.cpp
content/media/webaudio/BiquadFilterNode.cpp
content/media/webaudio/ConvolverNode.cpp
content/media/webaudio/DelayNode.cpp
content/media/webaudio/DynamicsCompressorNode.cpp
content/media/webaudio/GainNode.cpp
content/media/webaudio/MediaStreamAudioDestinationNode.cpp
content/media/webaudio/OfflineAudioCompletionEvent.cpp
content/media/webaudio/OscillatorNode.cpp
content/media/webspeech/synth/SpeechSynthesisUtterance.cpp
content/media/webspeech/synth/nsSpeechTask.cpp
content/svg/content/src/DOMSVGLength.cpp
content/svg/content/src/DOMSVGLengthList.cpp
content/svg/content/src/DOMSVGNumber.cpp
content/svg/content/src/DOMSVGNumberList.cpp
content/svg/content/src/DOMSVGPathSeg.cpp
content/svg/content/src/DOMSVGTransformList.cpp
content/svg/content/src/SVGSVGElement.cpp
content/svg/content/src/SVGSwitchElement.cpp
content/svg/content/src/SVGTransform.cpp
content/svg/content/src/SVGZoomEvent.cpp
content/svg/content/src/nsISVGPoint.cpp
content/xul/content/src/nsXULContextMenuBuilder.cpp
content/xul/content/src/nsXULElement.cpp
content/xul/content/src/nsXULPopupListener.cpp
content/xul/templates/src/nsRDFQuery.cpp
content/xul/templates/src/nsXULTemplateResultRDF.cpp
content/xul/templates/src/nsXULTreeBuilder.cpp
dom/activities/src/Activity.cpp
dom/audiochannel/AudioChannelAgent.cpp
dom/base/DOMCursor.cpp
dom/base/PerformanceResourceTiming.cpp
dom/base/nsFocusManager.cpp
dom/base/nsGlobalWindow.cpp
dom/bindings/Codegen.py
dom/bindings/Exceptions.cpp
dom/camera/DOMCameraControl.cpp
dom/camera/DOMCameraManager.cpp
dom/datastore/DataStore.cpp
dom/datastore/DataStoreCursor.cpp
dom/devicestorage/nsDeviceStorage.cpp
dom/events/DeviceMotionEvent.cpp
dom/events/EventListenerService.cpp
dom/events/EventStateManager.cpp
dom/events/IMEContentObserver.cpp
dom/events/TouchEvent.cpp
dom/events/UIEvent.cpp
dom/events/XULCommandEvent.cpp
dom/file/ArchiveRequest.cpp
dom/file/ArchiveZipFile.cpp
dom/file/File.cpp
dom/file/FileHandle.cpp
dom/file/FileRequest.cpp
dom/file/LockedFile.cpp
dom/ipc/TabChild.cpp
dom/mobilemessage/src/MobileMessageCursorCallback.cpp
dom/network/src/TCPServerSocketChild.cpp
dom/network/src/TCPServerSocketParent.cpp
dom/network/src/TCPSocketChild.cpp
dom/network/src/TCPSocketParent.cpp
dom/promise/Promise.cpp
dom/promise/PromiseCallback.cpp
dom/smil/TimeEvent.cpp
dom/src/geolocation/nsGeolocation.cpp
dom/src/notification/Notification.cpp
dom/src/offline/nsDOMOfflineResourceList.cpp
dom/telephony/TelephonyCall.cpp
dom/workers/URL.cpp
dom/workers/XMLHttpRequestUpload.cpp
dom/xbl/nsXBLResourceLoader.cpp
dom/xslt/xpath/nsXPathExpression.cpp
dom/xslt/xpath/nsXPathNSResolver.cpp
editor/composer/src/nsEditorSpellCheck.cpp
editor/libeditor/base/ChangeAttributeTxn.cpp
editor/libeditor/base/ChangeCSSInlineStyleTxn.cpp
editor/libeditor/base/CreateElementTxn.cpp
editor/libeditor/base/DeleteNodeTxn.cpp
editor/libeditor/base/DeleteRangeTxn.cpp
editor/libeditor/base/DeleteTextTxn.cpp
editor/libeditor/base/EditAggregateTxn.cpp
editor/libeditor/base/IMETextTxn.cpp
editor/libeditor/base/InsertElementTxn.cpp
editor/libeditor/base/InsertTextTxn.cpp
editor/libeditor/base/JoinElementTxn.cpp
editor/libeditor/base/SplitElementTxn.cpp
editor/libeditor/base/nsStyleSheetTxns.cpp
editor/libeditor/html/TypeInState.cpp
editor/libeditor/text/nsTextEditRules.cpp
editor/txtsvc/src/nsFilteredContentIterator.cpp
editor/txtsvc/src/nsTextServicesDocument.cpp
embedding/components/find/src/nsFind.cpp
extensions/spellcheck/hunspell/src/mozHunspell.cpp
extensions/spellcheck/src/mozEnglishWordUtils.cpp
extensions/spellcheck/src/mozInlineSpellChecker.cpp
extensions/spellcheck/src/mozPersonalDictionary.cpp
extensions/spellcheck/src/mozSpellChecker.cpp
image/src/ScriptedNotificationObserver.cpp
js/jsd/jsd_xpc.cpp
layout/xul/nsXULPopupManager.cpp
layout/xul/tree/nsTreeBoxObject.cpp
layout/xul/tree/nsTreeContentView.cpp
layout/xul/tree/nsTreeSelection.cpp
parser/html/nsHtml5DocumentBuilder.cpp
parser/htmlparser/src/nsExpatDriver.cpp
parser/xml/src/nsSAXXMLReader.cpp
rdf/datasource/src/nsLocalStore.cpp
toolkit/components/places/nsNavHistoryResult.cpp
toolkit/components/typeaheadfind/nsTypeAheadFind.cpp
widget/windows/JumpListItem.cpp
xpfe/components/directory/nsDirectoryViewer.cpp
--- a/accessible/src/base/AccEvent.cpp
+++ b/accessible/src/base/AccEvent.cpp
@@ -36,17 +36,17 @@ AccEvent::AccEvent(uint32_t aEventType, 
     mIsFromUserInput = EventStateManager::IsHandlingUserInput();
   else
     mIsFromUserInput = aIsFromUserInput == eFromUserInput ? true : false;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 // AccEvent cycle collection
 
-NS_IMPL_CYCLE_COLLECTION_1(AccEvent, mAccessible)
+NS_IMPL_CYCLE_COLLECTION(AccEvent, mAccessible)
 
 NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(AccEvent, AddRef)
 NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(AccEvent, Release)
 
 ////////////////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////////////////
 // AccTextChangeEvent
 ////////////////////////////////////////////////////////////////////////////////
--- a/accessible/src/base/NotificationController.cpp
+++ b/accessible/src/base/NotificationController.cpp
@@ -403,18 +403,18 @@ NotificationController::ContentInsertion
     }
 
     node = node->GetNextSibling();
   }
 
   return haveToUpdate;
 }
 
-NS_IMPL_CYCLE_COLLECTION_1(NotificationController::ContentInsertion,
-                           mContainer)
+NS_IMPL_CYCLE_COLLECTION(NotificationController::ContentInsertion,
+                         mContainer)
 
 NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(NotificationController::ContentInsertion,
                                      AddRef)
 NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(NotificationController::ContentInsertion,
                                        Release)
 
 void
 NotificationController::ContentInsertion::Process()
--- a/accessible/src/base/nsAccessiblePivot.cpp
+++ b/accessible/src/base/nsAccessiblePivot.cpp
@@ -43,17 +43,17 @@ nsAccessiblePivot::nsAccessiblePivot(Acc
   mStartOffset(-1), mEndOffset(-1)
 {
   NS_ASSERTION(aRoot, "A root accessible is required");
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 // nsISupports
 
-NS_IMPL_CYCLE_COLLECTION_3(nsAccessiblePivot, mRoot, mPosition, mObservers)
+NS_IMPL_CYCLE_COLLECTION(nsAccessiblePivot, mRoot, mPosition, mObservers)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsAccessiblePivot)
   NS_INTERFACE_MAP_ENTRY(nsIAccessiblePivot)
   NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIAccessiblePivot)
 NS_INTERFACE_MAP_END
 
 NS_IMPL_CYCLE_COLLECTING_ADDREF(nsAccessiblePivot)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(nsAccessiblePivot)
--- a/accessible/src/generic/Accessible.cpp
+++ b/accessible/src/generic/Accessible.cpp
@@ -86,18 +86,18 @@
 
 using namespace mozilla;
 using namespace mozilla::a11y;
 
 
 ////////////////////////////////////////////////////////////////////////////////
 // Accessible: nsISupports and cycle collection
 
-NS_IMPL_CYCLE_COLLECTION_3(Accessible,
-                           mContent, mParent, mChildren)
+NS_IMPL_CYCLE_COLLECTION(Accessible,
+                         mContent, mParent, mChildren)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(Accessible)
   NS_INTERFACE_MAP_ENTRY(nsIAccessible)
   if (aIID.Equals(NS_GET_IID(Accessible)))
     foundInterface = static_cast<nsIAccessible*>(this);
   else
   NS_INTERFACE_MAP_ENTRY_CONDITIONAL(nsIAccessibleSelectable, IsSelect())
   NS_INTERFACE_MAP_ENTRY_CONDITIONAL(nsIAccessibleValue, HasNumericValue())
--- a/accessible/src/xpcom/AccEventGen.py
+++ b/accessible/src/xpcom/AccEventGen.py
@@ -171,17 +171,17 @@ def allAttributes(iface):
         attributes.extend(attrs)
 
     return attributes
 
 def write_cpp(eventname, iface, fd):
     classname = "xpcAcc%s" % eventname
     attributes = allAttributes(iface)
     ccattributes = filter(lambda m: m.realtype.nativeType('in').endswith('*'), attributes)
-    fd.write("NS_IMPL_CYCLE_COLLECTION_%u(%s" % (len(ccattributes), classname))
+    fd.write("NS_IMPL_CYCLE_COLLECTION(%s" % classname)
     for c in ccattributes:
         fd.write(", m%s" % firstCap(c.name))
     fd.write(")\n\n");
 
     fd.write("NS_IMPL_CYCLE_COLLECTING_ADDREF(%s)\n" % classname)
     fd.write("NS_IMPL_CYCLE_COLLECTING_RELEASE(%s)\n\n" % classname)
 
     fd.write("NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(%s)\n" % classname)
--- a/accessible/src/xpcom/xpcAccessibleTextRange.cpp
+++ b/accessible/src/xpcom/xpcAccessibleTextRange.cpp
@@ -9,20 +9,20 @@
 #include "HyperTextAccessible.h"
 #include "TextRange.h"
 
 using namespace mozilla;
 using namespace mozilla::a11y;
 
 // nsISupports and cycle collection
 
-NS_IMPL_CYCLE_COLLECTION_3(xpcAccessibleTextRange,
-                           mRange.mRoot,
-                           mRange.mStartContainer,
-                           mRange.mEndContainer)
+NS_IMPL_CYCLE_COLLECTION(xpcAccessibleTextRange,
+                         mRange.mRoot,
+                         mRange.mStartContainer,
+                         mRange.mEndContainer)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(xpcAccessibleTextRange)
   NS_INTERFACE_MAP_ENTRY(nsIAccessibleTextRange)
   NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIAccessibleTextRange)
 NS_INTERFACE_MAP_END
 
 NS_IMPL_CYCLE_COLLECTING_ADDREF(xpcAccessibleTextRange)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(xpcAccessibleTextRange)
--- a/accessible/src/xul/XULTreeAccessible.cpp
+++ b/accessible/src/xul/XULTreeAccessible.cpp
@@ -60,18 +60,18 @@ XULTreeAccessible::
     if (autoCompletePopupElm)
       mGenericTypes |= eAutoCompletePopup;
   }
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 // XULTreeAccessible: nsISupports and cycle collection implementation
 
-NS_IMPL_CYCLE_COLLECTION_INHERITED_2(XULTreeAccessible, Accessible,
-                                     mTree, mAccessibleCache)
+NS_IMPL_CYCLE_COLLECTION_INHERITED(XULTreeAccessible, Accessible,
+                                   mTree, mAccessibleCache)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(XULTreeAccessible)
 NS_INTERFACE_MAP_END_INHERITING(Accessible)
 
 NS_IMPL_ADDREF_INHERITED(XULTreeAccessible, Accessible)
 NS_IMPL_RELEASE_INHERITED(XULTreeAccessible, Accessible)
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -701,18 +701,18 @@ XULTreeItemAccessibleBase::
 {
   mParent = aParent;
   mStateFlags |= eSharedNode;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 // XULTreeItemAccessibleBase: nsISupports implementation
 
-NS_IMPL_CYCLE_COLLECTION_INHERITED_1(XULTreeItemAccessibleBase, Accessible,
-                                     mTree)
+NS_IMPL_CYCLE_COLLECTION_INHERITED(XULTreeItemAccessibleBase, Accessible,
+                                   mTree)
 
 NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(XULTreeItemAccessibleBase)
   NS_INTERFACE_TABLE_INHERITED1(XULTreeItemAccessibleBase,
                                 XULTreeItemAccessibleBase)
 NS_INTERFACE_TABLE_TAIL_INHERITING(Accessible)
 NS_IMPL_ADDREF_INHERITED(XULTreeItemAccessibleBase, Accessible)
 NS_IMPL_RELEASE_INHERITED(XULTreeItemAccessibleBase, Accessible)
 
@@ -1101,19 +1101,19 @@ XULTreeItemAccessible::
 {
   mColumn = nsCoreUtils::GetFirstSensibleColumn(mTree);
   GetCellName(mColumn, mCachedName);
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 // XULTreeItemAccessible: nsISupports implementation
 
-NS_IMPL_CYCLE_COLLECTION_INHERITED_1(XULTreeItemAccessible,
-                                     XULTreeItemAccessibleBase,
-                                     mColumn)
+NS_IMPL_CYCLE_COLLECTION_INHERITED(XULTreeItemAccessible,
+                                   XULTreeItemAccessibleBase,
+                                   mColumn)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(XULTreeItemAccessible)
 NS_INTERFACE_MAP_END_INHERITING(XULTreeItemAccessibleBase)
 NS_IMPL_ADDREF_INHERITED(XULTreeItemAccessible, XULTreeItemAccessibleBase)
 NS_IMPL_RELEASE_INHERITED(XULTreeItemAccessible, XULTreeItemAccessibleBase)
 
 ////////////////////////////////////////////////////////////////////////////////
 // XULTreeItemAccessible: nsIAccessible implementation
--- a/accessible/src/xul/XULTreeGridAccessible.cpp
+++ b/accessible/src/xul/XULTreeGridAccessible.cpp
@@ -260,19 +260,19 @@ XULTreeGridRowAccessible::
   mAccessibleCache(kDefaultTreeCacheSize)
 {
   mGenericTypes |= eTableRow;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 // XULTreeGridRowAccessible: nsISupports and cycle collection implementation
 
-NS_IMPL_CYCLE_COLLECTION_INHERITED_1(XULTreeGridRowAccessible,
-                                     XULTreeItemAccessibleBase,
-                                     mAccessibleCache)
+NS_IMPL_CYCLE_COLLECTION_INHERITED(XULTreeGridRowAccessible,
+                                   XULTreeItemAccessibleBase,
+                                   mAccessibleCache)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(XULTreeGridRowAccessible)
 NS_INTERFACE_MAP_END_INHERITING(XULTreeItemAccessibleBase)
 
 NS_IMPL_ADDREF_INHERITED(XULTreeGridRowAccessible,
                          XULTreeItemAccessibleBase)
 NS_IMPL_RELEASE_INHERITED(XULTreeGridRowAccessible,
                           XULTreeItemAccessibleBase)
@@ -448,18 +448,18 @@ XULTreeGridCellAccessible::
     mTreeView->GetCellValue(mRow, mColumn, mCachedTextEquiv);
   else
     mTreeView->GetCellText(mRow, mColumn, mCachedTextEquiv);
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 // XULTreeGridCellAccessible: nsISupports implementation
 
-NS_IMPL_CYCLE_COLLECTION_INHERITED_2(XULTreeGridCellAccessible, LeafAccessible,
-                                     mTree, mColumn)
+NS_IMPL_CYCLE_COLLECTION_INHERITED(XULTreeGridCellAccessible, LeafAccessible,
+                                   mTree, mColumn)
 
 NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(XULTreeGridCellAccessible)
   NS_INTERFACE_TABLE_INHERITED2(XULTreeGridCellAccessible,
                                 nsIAccessibleTableCell,
                                 XULTreeGridCellAccessible)
 NS_INTERFACE_TABLE_TAIL_INHERITING(LeafAccessible)
 NS_IMPL_ADDREF_INHERITED(XULTreeGridCellAccessible, LeafAccessible)
 NS_IMPL_RELEASE_INHERITED(XULTreeGridCellAccessible, LeafAccessible)
--- a/content/base/src/DOMQuad.cpp
+++ b/content/base/src/DOMQuad.cpp
@@ -136,17 +136,17 @@ public:
     *aY1 = y1;
     *aY2 = y2;
   }
 
 protected:
   nsRefPtr<DOMQuad> mQuad;
 };
 
-NS_IMPL_CYCLE_COLLECTION_INHERITED_1(DOMQuad::QuadBounds, DOMRectReadOnly, mQuad)
+NS_IMPL_CYCLE_COLLECTION_INHERITED(DOMQuad::QuadBounds, DOMRectReadOnly, mQuad)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(DOMQuad::QuadBounds)
 NS_INTERFACE_MAP_END_INHERITING(DOMRectReadOnly)
 
 NS_IMPL_ADDREF_INHERITED(DOMQuad::QuadBounds, DOMRectReadOnly)
 NS_IMPL_RELEASE_INHERITED(DOMQuad::QuadBounds, DOMRectReadOnly)
 
 DOMRectReadOnly*
--- a/content/base/src/EventSource.cpp
+++ b/content/base/src/EventSource.cpp
@@ -516,17 +516,17 @@ public:
 
     return NS_OK;
   }
 
 private:
   nsRefPtr<EventSource> mEventSource;
 };
 
-NS_IMPL_CYCLE_COLLECTION_1(AsyncVerifyRedirectCallbackFwr, mEventSource)
+NS_IMPL_CYCLE_COLLECTION(AsyncVerifyRedirectCallbackFwr, mEventSource)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(AsyncVerifyRedirectCallbackFwr)
   NS_INTERFACE_MAP_ENTRY(nsISupports)
   NS_INTERFACE_MAP_ENTRY(nsIAsyncVerifyRedirectCallback)
 NS_INTERFACE_MAP_END
 
 NS_IMPL_CYCLE_COLLECTING_ADDREF(AsyncVerifyRedirectCallbackFwr)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(AsyncVerifyRedirectCallbackFwr)
--- a/content/base/src/FragmentOrElement.cpp
+++ b/content/base/src/FragmentOrElement.cpp
@@ -423,17 +423,17 @@ nsChildContentList::IndexOf(nsIContent* 
     return mNode->IndexOf(aContent);
   }
 
   return -1;
 }
 
 //----------------------------------------------------------------------
 
-NS_IMPL_CYCLE_COLLECTION_1(nsNode3Tearoff, mNode)
+NS_IMPL_CYCLE_COLLECTION(nsNode3Tearoff, mNode)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsNode3Tearoff)
   NS_INTERFACE_MAP_ENTRY(nsIDOMXPathNSResolver)
 NS_INTERFACE_MAP_END_AGGREGATED(mNode)
 
 NS_IMPL_CYCLE_COLLECTING_ADDREF(nsNode3Tearoff)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(nsNode3Tearoff)
 
@@ -478,17 +478,17 @@ nsNodeWeakReference::~nsNodeWeakReferenc
 NS_IMETHODIMP
 nsNodeWeakReference::QueryReferent(const nsIID& aIID, void** aInstancePtr)
 {
   return mNode ? mNode->QueryInterface(aIID, aInstancePtr) :
                  NS_ERROR_NULL_POINTER;
 }
 
 
-NS_IMPL_CYCLE_COLLECTION_1(nsNodeSupportsWeakRefTearoff, mNode)
+NS_IMPL_CYCLE_COLLECTION(nsNodeSupportsWeakRefTearoff, mNode)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsNodeSupportsWeakRefTearoff)
   NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference)
 NS_INTERFACE_MAP_END_AGGREGATED(mNode)
 
 NS_IMPL_CYCLE_COLLECTING_ADDREF(nsNodeSupportsWeakRefTearoff)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(nsNodeSupportsWeakRefTearoff)
 
--- a/content/base/src/ShadowRoot.cpp
+++ b/content/base/src/ShadowRoot.cpp
@@ -650,18 +650,18 @@ ShadowRoot::ContentRemoved(nsIDocument* 
 
   // Watch for node that is removed from the pool because
   // it may need to be removed from an insertion point.
   if (IsPooledNode(aChild, aContainer, mPoolHost)) {
     RemoveDistributedNode(aChild);
   }
 }
 
-NS_IMPL_CYCLE_COLLECTION_INHERITED_1(ShadowRootStyleSheetList, StyleSheetList,
-                                     mShadowRoot)
+NS_IMPL_CYCLE_COLLECTION_INHERITED(ShadowRootStyleSheetList, StyleSheetList,
+                                   mShadowRoot)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(ShadowRootStyleSheetList)
 NS_INTERFACE_MAP_END_INHERITING(StyleSheetList)
 
 NS_IMPL_ADDREF_INHERITED(ShadowRootStyleSheetList, StyleSheetList)
 NS_IMPL_RELEASE_INHERITED(ShadowRootStyleSheetList, StyleSheetList)
 
 ShadowRootStyleSheetList::ShadowRootStyleSheetList(ShadowRoot* aShadowRoot)
--- a/content/base/src/TreeWalker.cpp
+++ b/content/base/src/TreeWalker.cpp
@@ -36,17 +36,17 @@ TreeWalker::~TreeWalker()
 {
     /* destructor code */
 }
 
 /*
  * nsISupports and cycle collection stuff
  */
 
-NS_IMPL_CYCLE_COLLECTION_3(TreeWalker, mFilter, mCurrentNode, mRoot)
+NS_IMPL_CYCLE_COLLECTION(TreeWalker, mFilter, mCurrentNode, mRoot)
 
 // QueryInterface implementation for TreeWalker
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(TreeWalker)
     NS_INTERFACE_MAP_ENTRY(nsIDOMTreeWalker)
     NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIDOMTreeWalker)
 NS_INTERFACE_MAP_END
 
 // Have to pass in dom::TreeWalker because a11y has an a11y::TreeWalker that
--- a/content/base/src/nsContentIterator.cpp
+++ b/content/base/src/nsContentIterator.cpp
@@ -206,21 +206,21 @@ NS_IMPL_CYCLE_COLLECTING_RELEASE_WITH_LA
                                                    LastRelease())
 
 NS_INTERFACE_MAP_BEGIN(nsContentIterator)
   NS_INTERFACE_MAP_ENTRY(nsIContentIterator)
   NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIContentIterator)
   NS_INTERFACE_MAP_ENTRIES_CYCLE_COLLECTION(nsContentIterator)
 NS_INTERFACE_MAP_END
 
-NS_IMPL_CYCLE_COLLECTION_4(nsContentIterator,
-                           mCurNode,
-                           mFirst,
-                           mLast,
-                           mCommonParent)
+NS_IMPL_CYCLE_COLLECTION(nsContentIterator,
+                         mCurNode,
+                         mFirst,
+                         mLast,
+                         mCommonParent)
 
 void
 nsContentIterator::LastRelease()
 {
   mCurNode = nullptr;
   mFirst = nullptr;
   mLast = nullptr;
   mCommonParent = nullptr;
@@ -1153,18 +1153,18 @@ protected:
 };
 
 NS_IMPL_ADDREF_INHERITED(nsContentSubtreeIterator, nsContentIterator)
 NS_IMPL_RELEASE_INHERITED(nsContentSubtreeIterator, nsContentIterator)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(nsContentSubtreeIterator)
 NS_INTERFACE_MAP_END_INHERITING(nsContentIterator)
 
-NS_IMPL_CYCLE_COLLECTION_INHERITED_1(nsContentSubtreeIterator, nsContentIterator,
-                                     mRange)
+NS_IMPL_CYCLE_COLLECTION_INHERITED(nsContentSubtreeIterator, nsContentIterator,
+                                   mRange)
 
 void
 nsContentSubtreeIterator::LastRelease()
 {
   mRange = nullptr;
   nsContentIterator::LastRelease();
 }
 
--- a/content/base/src/nsContentList.cpp
+++ b/content/base/src/nsContentList.cpp
@@ -130,18 +130,18 @@ nsBaseContentList::IndexOf(nsIContent *a
 }
 
 int32_t
 nsBaseContentList::IndexOf(nsIContent* aContent)
 {
   return IndexOf(aContent, true);
 }
 
-NS_IMPL_CYCLE_COLLECTION_INHERITED_1(nsSimpleContentList, nsBaseContentList,
-                                     mRoot)
+NS_IMPL_CYCLE_COLLECTION_INHERITED(nsSimpleContentList, nsBaseContentList,
+                                   mRoot)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(nsSimpleContentList)
 NS_INTERFACE_MAP_END_INHERITING(nsBaseContentList)
 
 
 NS_IMPL_ADDREF_INHERITED(nsSimpleContentList, nsBaseContentList)
 NS_IMPL_RELEASE_INHERITED(nsSimpleContentList, nsBaseContentList)
 
--- a/content/base/src/nsDocumentEncoder.cpp
+++ b/content/base/src/nsDocumentEncoder.cpp
@@ -177,18 +177,18 @@ protected:
 NS_IMPL_CYCLE_COLLECTING_ADDREF(nsDocumentEncoder)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(nsDocumentEncoder)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsDocumentEncoder)
    NS_INTERFACE_MAP_ENTRY(nsIDocumentEncoder)
    NS_INTERFACE_MAP_ENTRY(nsISupports)
 NS_INTERFACE_MAP_END
 
-NS_IMPL_CYCLE_COLLECTION_5(nsDocumentEncoder,
-                           mDocument, mSelection, mRange, mNode, mCommonParent)
+NS_IMPL_CYCLE_COLLECTION(nsDocumentEncoder,
+                         mDocument, mSelection, mRange, mNode, mCommonParent)
 
 nsDocumentEncoder::nsDocumentEncoder() : mCachedBuffer(nullptr)
 {
   Initialize();
   mMimeType.AssignLiteral("text/plain");
 }
 
 void nsDocumentEncoder::Initialize(bool aClearCachedSerializer)
--- a/content/base/src/nsFrameLoader.cpp
+++ b/content/base/src/nsFrameLoader.cpp
@@ -245,17 +245,17 @@ nsContentView::GetId(nsContentViewId* aI
 // does not count chrome frames when determining depth, nor does it
 // prevent chrome recursion.  Number is fairly arbitrary, but meant to
 // keep number of shells to a reasonable number on accidental recursion with a
 // small (but not 1) branching factor.  With large branching factors the number
 // of shells can rapidly become huge and run us out of memory.  To solve that,
 // we'd need to re-institute a fixed version of bug 98158.
 #define MAX_DEPTH_CONTENT_FRAMES 10
 
-NS_IMPL_CYCLE_COLLECTION_3(nsFrameLoader, mDocShell, mMessageManager, mChildMessageManager)
+NS_IMPL_CYCLE_COLLECTION(nsFrameLoader, mDocShell, mMessageManager, mChildMessageManager)
 NS_IMPL_CYCLE_COLLECTING_ADDREF(nsFrameLoader)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(nsFrameLoader)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsFrameLoader)
   NS_INTERFACE_MAP_ENTRY(nsIFrameLoader)
   NS_INTERFACE_MAP_ENTRY(nsIContentViewManager)
   NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIFrameLoader)
 NS_INTERFACE_MAP_END
--- a/content/base/src/nsInProcessTabChildGlobal.cpp
+++ b/content/base/src/nsInProcessTabChildGlobal.cpp
@@ -138,20 +138,20 @@ nsInProcessTabChildGlobal::Init()
   NS_WARN_IF_FALSE(NS_SUCCEEDED(rv),
                    "Couldn't initialize nsInProcessTabChildGlobal");
   mMessageManager = new nsFrameMessageManager(this,
                                               nullptr,
                                               dom::ipc::MM_CHILD);
   return NS_OK;
 }
 
-NS_IMPL_CYCLE_COLLECTION_INHERITED_2(nsInProcessTabChildGlobal,
-                                     DOMEventTargetHelper,
-                                     mMessageManager,
-                                     mGlobal)
+NS_IMPL_CYCLE_COLLECTION_INHERITED(nsInProcessTabChildGlobal,
+                                   DOMEventTargetHelper,
+                                   mMessageManager,
+                                   mGlobal)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(nsInProcessTabChildGlobal)
   NS_INTERFACE_MAP_ENTRY(nsIMessageListenerManager)
   NS_INTERFACE_MAP_ENTRY(nsIMessageSender)
   NS_INTERFACE_MAP_ENTRY(nsISyncMessageSender)
   NS_INTERFACE_MAP_ENTRY(nsIContentFrameMessageManager)
   NS_INTERFACE_MAP_ENTRY(nsIInProcessContentFrameMessageManager)
   NS_INTERFACE_MAP_ENTRY(nsIScriptObjectPrincipal)
--- a/content/base/src/nsObjectLoadingContent.cpp
+++ b/content/base/src/nsObjectLoadingContent.cpp
@@ -1152,17 +1152,17 @@ public:
   ObjectInterfaceRequestorShim(nsIObjectLoadingContent* aContent)
     : mContent(aContent)
   {}
 
 protected:
   nsCOMPtr<nsIObjectLoadingContent> mContent;
 };
 
-NS_IMPL_CYCLE_COLLECTION_1(ObjectInterfaceRequestorShim, mContent)
+NS_IMPL_CYCLE_COLLECTION(ObjectInterfaceRequestorShim, mContent)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(ObjectInterfaceRequestorShim)
   NS_INTERFACE_MAP_ENTRY(nsIInterfaceRequestor)
   NS_INTERFACE_MAP_ENTRY(nsIChannelEventSink)
   NS_INTERFACE_MAP_ENTRY(nsIStreamListener)
   NS_INTERFACE_MAP_ENTRY(nsIRequestObserver)
   NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIInterfaceRequestor)
 NS_INTERFACE_MAP_END
--- a/content/base/src/nsXMLHttpRequest.cpp
+++ b/content/base/src/nsXMLHttpRequest.cpp
@@ -3336,17 +3336,17 @@ public:
 
     return NS_OK;
   }
 
 private:
   nsRefPtr<nsXMLHttpRequest> mXHR;
 };
 
-NS_IMPL_CYCLE_COLLECTION_1(AsyncVerifyRedirectCallbackForwarder, mXHR)
+NS_IMPL_CYCLE_COLLECTION(AsyncVerifyRedirectCallbackForwarder, mXHR)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(AsyncVerifyRedirectCallbackForwarder)
   NS_INTERFACE_MAP_ENTRY(nsISupports)
   NS_INTERFACE_MAP_ENTRY(nsIAsyncVerifyRedirectCallback)
 NS_INTERFACE_MAP_END
 
 NS_IMPL_CYCLE_COLLECTING_ADDREF(AsyncVerifyRedirectCallbackForwarder)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(AsyncVerifyRedirectCallbackForwarder)
@@ -3804,17 +3804,17 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(
   NS_INTERFACE_MAP_ENTRY(nsIInterfaceRequestor)
   NS_INTERFACE_MAP_ENTRY(nsITimerCallback)
   NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIStreamListener)
 NS_INTERFACE_MAP_END
 
 NS_IMPL_CYCLE_COLLECTING_ADDREF(nsXMLHttpRequestXPCOMifier)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(nsXMLHttpRequestXPCOMifier)
 
-// Can't NS_IMPL_CYCLE_COLLECTION_1 because mXHR has ambiguous
+// Can't NS_IMPL_CYCLE_COLLECTION( because mXHR has ambiguous
 // inheritance from nsISupports.
 NS_IMPL_CYCLE_COLLECTION_CLASS(nsXMLHttpRequestXPCOMifier)
 
 NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(nsXMLHttpRequestXPCOMifier)
 if (tmp->mXHR) {
   tmp->mXHR->mXPCOMifier = nullptr;
 }
 NS_IMPL_CYCLE_COLLECTION_UNLINK(mXHR)
--- a/content/canvas/src/WebGLUniformLocation.cpp
+++ b/content/canvas/src/WebGLUniformLocation.cpp
@@ -22,12 +22,12 @@ WebGLUniformLocation::WebGLUniformLocati
     , mProgram(program)
     , mProgramGeneration(program->Generation())
     , mLocation(location)
     , mInfo(info)
 {
     mElementSize = info.ElementSize();
 }
 
-NS_IMPL_CYCLE_COLLECTION_1(WebGLUniformLocation, mProgram)
+NS_IMPL_CYCLE_COLLECTION(WebGLUniformLocation, mProgram)
 
 NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(WebGLUniformLocation, AddRef)
 NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(WebGLUniformLocation, Release)
--- a/content/html/content/src/HTMLButtonElement.cpp
+++ b/content/html/content/src/HTMLButtonElement.cpp
@@ -71,19 +71,19 @@ HTMLButtonElement::HTMLButtonElement(alr
 }
 
 HTMLButtonElement::~HTMLButtonElement()
 {
 }
 
 // nsISupports
 
-NS_IMPL_CYCLE_COLLECTION_INHERITED_1(HTMLButtonElement,
-                                     nsGenericHTMLFormElementWithState,
-                                     mValidity)
+NS_IMPL_CYCLE_COLLECTION_INHERITED(HTMLButtonElement,
+                                   nsGenericHTMLFormElementWithState,
+                                   mValidity)
 
 NS_IMPL_ADDREF_INHERITED(HTMLButtonElement, Element)
 NS_IMPL_RELEASE_INHERITED(HTMLButtonElement, Element)
 
 
 // QueryInterface implementation for HTMLButtonElement
 NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(HTMLButtonElement)
   NS_INTERFACE_TABLE_INHERITED2(HTMLButtonElement,
--- a/content/html/content/src/HTMLCanvasElement.cpp
+++ b/content/html/content/src/HTMLCanvasElement.cpp
@@ -118,19 +118,19 @@ HTMLCanvasElement::HTMLCanvasElement(alr
 {
 }
 
 HTMLCanvasElement::~HTMLCanvasElement()
 {
   ResetPrintCallback();
 }
 
-NS_IMPL_CYCLE_COLLECTION_INHERITED_4(HTMLCanvasElement, nsGenericHTMLElement,
-                                     mCurrentContext, mPrintCallback,
-                                     mPrintState, mOriginalCanvas)
+NS_IMPL_CYCLE_COLLECTION_INHERITED(HTMLCanvasElement, nsGenericHTMLElement,
+                                   mCurrentContext, mPrintCallback,
+                                   mPrintState, mOriginalCanvas)
 
 NS_IMPL_ADDREF_INHERITED(HTMLCanvasElement, Element)
 NS_IMPL_RELEASE_INHERITED(HTMLCanvasElement, Element)
 
 NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(HTMLCanvasElement)
   NS_INTERFACE_TABLE_INHERITED1(HTMLCanvasElement, nsIDOMHTMLCanvasElement)
 NS_INTERFACE_TABLE_TAIL_INHERITING(nsGenericHTMLElement)
 
--- a/content/html/content/src/HTMLContentElement.cpp
+++ b/content/html/content/src/HTMLContentElement.cpp
@@ -26,19 +26,19 @@ HTMLContentElement::HTMLContentElement(a
 {
   SetIsDOMBinding();
 }
 
 HTMLContentElement::~HTMLContentElement()
 {
 }
 
-NS_IMPL_CYCLE_COLLECTION_INHERITED_1(HTMLContentElement,
-                                     nsGenericHTMLElement,
-                                     mMatchedNodes)
+NS_IMPL_CYCLE_COLLECTION_INHERITED(HTMLContentElement,
+                                   nsGenericHTMLElement,
+                                   mMatchedNodes)
 
 NS_IMPL_ADDREF_INHERITED(HTMLContentElement, Element)
 NS_IMPL_RELEASE_INHERITED(HTMLContentElement, Element)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(HTMLContentElement)
 NS_INTERFACE_MAP_END_INHERITING(nsGenericHTMLElement)
 
 NS_IMPL_ELEMENT_CLONE(HTMLContentElement)
@@ -237,17 +237,17 @@ HTMLContentElement::Match(nsIContent* aC
 
 already_AddRefed<DistributedContentList>
 HTMLContentElement::GetDistributedNodes()
 {
   nsRefPtr<DistributedContentList> list = new DistributedContentList(this);
   return list.forget();
 }
 
-NS_IMPL_CYCLE_COLLECTION_2(DistributedContentList, mParent, mDistributedNodes)
+NS_IMPL_CYCLE_COLLECTION(DistributedContentList, mParent, mDistributedNodes)
 
 NS_INTERFACE_TABLE_HEAD(DistributedContentList)
   NS_INTERFACE_TABLE1(DistributedContentList, nsINodeList)
   NS_INTERFACE_TABLE_TO_MAP_SEGUE_CYCLE_COLLECTION(DistributedContentList)
 NS_INTERFACE_MAP_END
 
 NS_IMPL_CYCLE_COLLECTING_ADDREF(DistributedContentList)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(DistributedContentList)
--- a/content/html/content/src/HTMLDataListElement.cpp
+++ b/content/html/content/src/HTMLDataListElement.cpp
@@ -16,18 +16,18 @@ HTMLDataListElement::~HTMLDataListElemen
 }
 
 JSObject*
 HTMLDataListElement::WrapNode(JSContext *aCx)
 {
   return HTMLDataListElementBinding::Wrap(aCx, this);
 }
 
-NS_IMPL_CYCLE_COLLECTION_INHERITED_1(HTMLDataListElement, nsGenericHTMLElement,
-                                     mOptions)
+NS_IMPL_CYCLE_COLLECTION_INHERITED(HTMLDataListElement, nsGenericHTMLElement,
+                                   mOptions)
 
 NS_IMPL_ADDREF_INHERITED(HTMLDataListElement, Element)
 NS_IMPL_RELEASE_INHERITED(HTMLDataListElement, Element)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(HTMLDataListElement)
 NS_INTERFACE_MAP_END_INHERITING(nsGenericHTMLElement)
 
 
--- a/content/html/content/src/HTMLFieldSetElement.cpp
+++ b/content/html/content/src/HTMLFieldSetElement.cpp
@@ -33,18 +33,18 @@ HTMLFieldSetElement::~HTMLFieldSetElemen
   uint32_t length = mDependentElements.Length();
   for (uint32_t i = 0; i < length; ++i) {
     mDependentElements[i]->ForgetFieldSet(this);
   }
 }
 
 // nsISupports
 
-NS_IMPL_CYCLE_COLLECTION_INHERITED_2(HTMLFieldSetElement, nsGenericHTMLFormElement,
-                                     mValidity, mElements)
+NS_IMPL_CYCLE_COLLECTION_INHERITED(HTMLFieldSetElement, nsGenericHTMLFormElement,
+                                   mValidity, mElements)
 
 NS_IMPL_ADDREF_INHERITED(HTMLFieldSetElement, Element)
 NS_IMPL_RELEASE_INHERITED(HTMLFieldSetElement, Element)
 
 // QueryInterface implementation for HTMLFieldSetElement
 NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(HTMLFieldSetElement)
   NS_INTERFACE_TABLE_INHERITED2(HTMLFieldSetElement,
                                 nsIDOMHTMLFieldSetElement,
--- a/content/html/content/src/HTMLPropertiesCollection.cpp
+++ b/content/html/content/src/HTMLPropertiesCollection.cpp
@@ -490,18 +490,18 @@ PropertyNodeList::EnsureFresh()
   }
 }
 
 PropertyStringList::PropertyStringList(HTMLPropertiesCollection* aCollection)
   : DOMStringList()
   , mCollection(aCollection)
 { }
 
-NS_IMPL_CYCLE_COLLECTION_INHERITED_1(PropertyStringList, DOMStringList,
-                                     mCollection)
+NS_IMPL_CYCLE_COLLECTION_INHERITED(PropertyStringList, DOMStringList,
+                                   mCollection)
 
 NS_IMPL_ADDREF_INHERITED(PropertyStringList, DOMStringList)
 NS_IMPL_RELEASE_INHERITED(PropertyStringList, DOMStringList)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(PropertyStringList)
 NS_INTERFACE_MAP_END_INHERITING(DOMStringList)
 
 void
--- a/content/html/content/src/HTMLTextAreaElement.cpp
+++ b/content/html/content/src/HTMLTextAreaElement.cpp
@@ -70,21 +70,21 @@ HTMLTextAreaElement::HTMLTextAreaElement
   // until someone calls UpdateEditableState on us, apparently!  Also
   // by default we don't have to show validity UI and so forth.
   AddStatesSilently(NS_EVENT_STATE_ENABLED |
                     NS_EVENT_STATE_OPTIONAL |
                     NS_EVENT_STATE_VALID);
 }
 
 
-NS_IMPL_CYCLE_COLLECTION_INHERITED_3(HTMLTextAreaElement,
-                                     nsGenericHTMLFormElementWithState,
-                                     mValidity,
-                                     mControllers,
-                                     mState)
+NS_IMPL_CYCLE_COLLECTION_INHERITED(HTMLTextAreaElement,
+                                   nsGenericHTMLFormElementWithState,
+                                   mValidity,
+                                   mControllers,
+                                   mState)
 
 NS_IMPL_ADDREF_INHERITED(HTMLTextAreaElement, Element)
 NS_IMPL_RELEASE_INHERITED(HTMLTextAreaElement, Element)
 
 
 // QueryInterface implementation for HTMLTextAreaElement
 NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(HTMLTextAreaElement)
   NS_INTERFACE_TABLE_INHERITED5(HTMLTextAreaElement,
--- a/content/html/content/src/HTMLTrackElement.cpp
+++ b/content/html/content/src/HTMLTrackElement.cpp
@@ -89,19 +89,19 @@ HTMLTrackElement::~HTMLTrackElement()
 {
 }
 
 NS_IMPL_ELEMENT_CLONE(HTMLTrackElement)
 
 NS_IMPL_ADDREF_INHERITED(HTMLTrackElement, Element)
 NS_IMPL_RELEASE_INHERITED(HTMLTrackElement, Element)
 
-NS_IMPL_CYCLE_COLLECTION_INHERITED_4(HTMLTrackElement, nsGenericHTMLElement,
-                                     mTrack, mChannel, mMediaParent,
-                                     mListener)
+NS_IMPL_CYCLE_COLLECTION_INHERITED(HTMLTrackElement, nsGenericHTMLElement,
+                                   mTrack, mChannel, mMediaParent,
+                                   mListener)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(HTMLTrackElement)
 NS_INTERFACE_MAP_END_INHERITING(nsGenericHTMLElement)
 
 void
 HTMLTrackElement::GetKind(DOMString& aKind) const
 {
   GetEnumAttr(nsGkAtoms::kind, kKindTableDefaultString, aKind);
--- a/content/html/content/src/TextTrackManager.cpp
+++ b/content/html/content/src/TextTrackManager.cpp
@@ -70,18 +70,18 @@ CompareTextTracks::LessThan(TextTrack* a
       return true;
     case MediaResourceSpecific:
       // No rules for Media Resource Specific tracks yet.
       break;
   }
   return true;
 }
 
-NS_IMPL_CYCLE_COLLECTION_4(TextTrackManager, mMediaElement, mTextTracks,
-                           mPendingTextTracks, mNewCues)
+NS_IMPL_CYCLE_COLLECTION(TextTrackManager, mMediaElement, mTextTracks,
+                         mPendingTextTracks, mNewCues)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(TextTrackManager)
   NS_INTERFACE_MAP_ENTRY(nsIDOMEventListener)
 NS_INTERFACE_MAP_END
 
 NS_IMPL_CYCLE_COLLECTING_ADDREF(TextTrackManager)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(TextTrackManager)
 
--- a/content/html/content/src/UndoManager.cpp
+++ b/content/html/content/src/UndoManager.cpp
@@ -114,17 +114,17 @@ protected:
   nsCOMPtr<nsIContent> mElement;
   int32_t mNameSpaceID;
   nsCOMPtr<nsIAtom> mAttrAtom;
   int32_t mModType;
   nsString mRedoValue;
   nsString mUndoValue;
 };
 
-NS_IMPL_CYCLE_COLLECTION_2(UndoAttrChanged, mElement, mAttrAtom)
+NS_IMPL_CYCLE_COLLECTION(UndoAttrChanged, mElement, mAttrAtom)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(UndoAttrChanged)
   NS_INTERFACE_MAP_ENTRY(nsITransaction)
   NS_INTERFACE_MAP_ENTRY(nsISupports)
 NS_INTERFACE_MAP_END
 
 NS_IMPL_CYCLE_COLLECTING_ADDREF(UndoAttrChanged)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(UndoAttrChanged)
@@ -220,17 +220,17 @@ class UndoTextChanged : public UndoTxn {
 protected:
   void SaveRedoState();
   nsCOMPtr<nsIContent> mContent;
   UndoCharacterChangedData mChange;
   nsString mRedoValue;
   nsString mUndoValue;
 };
 
-NS_IMPL_CYCLE_COLLECTION_1(UndoTextChanged, mContent)
+NS_IMPL_CYCLE_COLLECTION(UndoTextChanged, mContent)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(UndoTextChanged)
   NS_INTERFACE_MAP_ENTRY(nsITransaction)
   NS_INTERFACE_MAP_ENTRY(nsISupports)
 NS_INTERFACE_MAP_END
 
 NS_IMPL_CYCLE_COLLECTING_ADDREF(UndoTextChanged)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(UndoTextChanged)
@@ -329,17 +329,17 @@ class UndoContentAppend : public UndoTxn
   NS_IMETHOD RedoTransaction();
   NS_IMETHOD UndoTransaction();
   UndoContentAppend(nsIContent* aContent);
 protected:
   nsCOMPtr<nsIContent> mContent;
   nsCOMArray<nsIContent> mChildren;
 };
 
-NS_IMPL_CYCLE_COLLECTION_2(UndoContentAppend, mContent, mChildren)
+NS_IMPL_CYCLE_COLLECTION(UndoContentAppend, mContent, mChildren)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(UndoContentAppend)
   NS_INTERFACE_MAP_ENTRY(nsITransaction)
   NS_INTERFACE_MAP_ENTRY(nsISupports)
 NS_INTERFACE_MAP_END
 
 NS_IMPL_CYCLE_COLLECTING_ADDREF(UndoContentAppend)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(UndoContentAppend)
@@ -400,17 +400,17 @@ class UndoContentInsert : public UndoTxn
   UndoContentInsert(nsIContent* aContent, nsIContent* aChild,
                     int32_t aInsertIndex);
 protected:
   nsCOMPtr<nsIContent> mContent;
   nsCOMPtr<nsIContent> mChild;
   nsCOMPtr<nsIContent> mNextNode;
 };
 
-NS_IMPL_CYCLE_COLLECTION_3(UndoContentInsert, mContent, mChild, mNextNode)
+NS_IMPL_CYCLE_COLLECTION(UndoContentInsert, mContent, mChild, mNextNode)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(UndoContentInsert)
   NS_INTERFACE_MAP_ENTRY(nsITransaction)
   NS_INTERFACE_MAP_ENTRY(nsISupports)
 NS_INTERFACE_MAP_END
 
 NS_IMPL_CYCLE_COLLECTING_ADDREF(UndoContentInsert)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(UndoContentInsert)
@@ -488,17 +488,17 @@ class UndoContentRemove : public UndoTxn
   UndoContentRemove(nsIContent* aContent, nsIContent* aChild,
                     int32_t aInsertIndex);
 protected:
   nsCOMPtr<nsIContent> mContent;
   nsCOMPtr<nsIContent> mChild;
   nsCOMPtr<nsIContent> mNextNode;
 };
 
-NS_IMPL_CYCLE_COLLECTION_3(UndoContentRemove, mContent, mChild, mNextNode)
+NS_IMPL_CYCLE_COLLECTION(UndoContentRemove, mContent, mChild, mNextNode)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(UndoContentRemove)
   NS_INTERFACE_MAP_ENTRY(nsITransaction)
   NS_INTERFACE_MAP_ENTRY(nsISupports)
 NS_INTERFACE_MAP_END
 
 NS_IMPL_CYCLE_COLLECTING_ADDREF(UndoContentRemove)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(UndoContentRemove)
@@ -736,17 +736,17 @@ protected:
   /**
    * Call a function member on the transaction object with the
    * specified function name.
    */
   nsRefPtr<DOMTransaction> mTransaction;
   uint32_t mFlags;
 };
 
-NS_IMPL_CYCLE_COLLECTION_1(FunctionCallTxn, mTransaction)
+NS_IMPL_CYCLE_COLLECTION(FunctionCallTxn, mTransaction)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(FunctionCallTxn)
   NS_INTERFACE_MAP_ENTRY(nsITransaction)
   NS_INTERFACE_MAP_ENTRY(nsISupports)
 NS_INTERFACE_MAP_END
 
 NS_IMPL_CYCLE_COLLECTING_ADDREF(FunctionCallTxn)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(FunctionCallTxn)
--- a/content/html/content/src/nsGenericHTMLElement.cpp
+++ b/content/html/content/src/nsGenericHTMLElement.cpp
@@ -184,17 +184,17 @@ class nsGenericHTMLElementTearoff : publ
 
   NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(nsGenericHTMLElementTearoff,
                                            nsIDOMElementCSSInlineStyle)
 
 private:
   nsRefPtr<nsGenericHTMLElement> mElement;
 };
 
-NS_IMPL_CYCLE_COLLECTION_1(nsGenericHTMLElementTearoff, mElement)
+NS_IMPL_CYCLE_COLLECTION(nsGenericHTMLElementTearoff, mElement)
 
 NS_IMPL_CYCLE_COLLECTING_ADDREF(nsGenericHTMLElementTearoff)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(nsGenericHTMLElementTearoff)
 
 NS_INTERFACE_TABLE_HEAD(nsGenericHTMLElementTearoff)
   NS_INTERFACE_TABLE_INHERITED1(nsGenericHTMLElementTearoff,
                                 nsIDOMElementCSSInlineStyle)
   NS_INTERFACE_TABLE_TO_MAP_SEGUE_CYCLE_COLLECTION(nsGenericHTMLElementTearoff)
--- a/content/html/content/src/nsTextEditorState.cpp
+++ b/content/html/content/src/nsTextEditorState.cpp
@@ -251,17 +251,17 @@ NS_IMPL_CYCLE_COLLECTING_RELEASE(nsTextI
 NS_INTERFACE_TABLE_HEAD(nsTextInputSelectionImpl)
   NS_INTERFACE_TABLE3(nsTextInputSelectionImpl,
                       nsISelectionController,
                       nsISelectionDisplay,
                       nsISupportsWeakReference)
   NS_INTERFACE_TABLE_TO_MAP_SEGUE_CYCLE_COLLECTION(nsTextInputSelectionImpl)
 NS_INTERFACE_MAP_END
 
-NS_IMPL_CYCLE_COLLECTION_2(nsTextInputSelectionImpl, mFrameSelection, mLimiter)
+NS_IMPL_CYCLE_COLLECTION(nsTextInputSelectionImpl, mFrameSelection, mLimiter)
 
 
 // BEGIN nsTextInputSelectionImpl
 
 nsTextInputSelectionImpl::nsTextInputSelectionImpl(nsFrameSelection *aSel,
                                                    nsIPresShell *aShell,
                                                    nsIContent *aLimiter)
   : mScrollFrame(nullptr)
--- a/content/html/document/src/ImageDocument.cpp
+++ b/content/html/document/src/ImageDocument.cpp
@@ -142,18 +142,18 @@ ImageDocument::ImageDocument()
   // bother initializing members to 0.
 }
 
 ImageDocument::~ImageDocument()
 {
 }
 
 
-NS_IMPL_CYCLE_COLLECTION_INHERITED_1(ImageDocument, MediaDocument,
-                                     mImageContent)
+NS_IMPL_CYCLE_COLLECTION_INHERITED(ImageDocument, MediaDocument,
+                                   mImageContent)
 
 NS_IMPL_ADDREF_INHERITED(ImageDocument, MediaDocument)
 NS_IMPL_RELEASE_INHERITED(ImageDocument, MediaDocument)
 
 NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(ImageDocument)
   NS_INTERFACE_TABLE_INHERITED3(ImageDocument, nsIImageDocument,
                                 imgINotificationObserver, nsIDOMEventListener)
 NS_INTERFACE_TABLE_TAIL_INHERITING(MediaDocument)
--- a/content/html/document/src/PluginDocument.cpp
+++ b/content/html/document/src/PluginDocument.cpp
@@ -104,18 +104,18 @@ PluginStreamListener::OnStartRequest(nsI
 
 PluginDocument::PluginDocument()
 {}
 
 PluginDocument::~PluginDocument()
 {}
 
 
-NS_IMPL_CYCLE_COLLECTION_INHERITED_1(PluginDocument, MediaDocument,
-                                     mPluginContent)
+NS_IMPL_CYCLE_COLLECTION_INHERITED(PluginDocument, MediaDocument,
+                                   mPluginContent)
 
 NS_IMPL_ADDREF_INHERITED(PluginDocument, MediaDocument)
 NS_IMPL_RELEASE_INHERITED(PluginDocument, MediaDocument)
 
 NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(PluginDocument)
   NS_INTERFACE_TABLE_INHERITED1(PluginDocument, nsIPluginDocument)
 NS_INTERFACE_TABLE_TAIL_INHERITING(MediaDocument)
 
--- a/content/html/document/src/nsHTMLDocument.cpp
+++ b/content/html/document/src/nsHTMLDocument.cpp
@@ -194,28 +194,28 @@ nsHTMLDocument::nsHTMLDocument()
   mDefaultElementType = kNameSpaceID_XHTML;
   mCompatMode = eCompatibility_NavQuirks;
 }
 
 nsHTMLDocument::~nsHTMLDocument()
 {
 }
 
-NS_IMPL_CYCLE_COLLECTION_INHERITED_11(nsHTMLDocument, nsDocument,
-                                      mAll,
-                                      mImages,
-                                      mApplets,
-                                      mEmbeds,
-                                      mLinks,
-                                      mAnchors,
-                                      mScripts,
-                                      mForms,
-                                      mFormControls,
-                                      mWyciwygChannel,
-                                      mMidasCommandManager)
+NS_IMPL_CYCLE_COLLECTION_INHERITED(nsHTMLDocument, nsDocument,
+                                   mAll,
+                                   mImages,
+                                   mApplets,
+                                   mEmbeds,
+                                   mLinks,
+                                   mAnchors,
+                                   mScripts,
+                                   mForms,
+                                   mFormControls,
+                                   mWyciwygChannel,
+                                   mMidasCommandManager)
 
 NS_IMPL_ADDREF_INHERITED(nsHTMLDocument, nsDocument)
 NS_IMPL_RELEASE_INHERITED(nsHTMLDocument, nsDocument)
 
 // QueryInterface implementation for nsHTMLDocument
 NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(nsHTMLDocument)
   NS_INTERFACE_TABLE_INHERITED2(nsHTMLDocument, nsIHTMLDocument,
                                 nsIDOMHTMLDocument)
--- a/content/media/DOMMediaStream.cpp
+++ b/content/media/DOMMediaStream.cpp
@@ -39,18 +39,18 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mConsumersToKeepAlive)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE_SCRIPT_OBJECTS
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
 NS_IMPL_CYCLE_COLLECTION_TRACE_WRAPPERCACHE(DOMMediaStream)
 
 NS_IMPL_ISUPPORTS_INHERITED1(DOMLocalMediaStream, DOMMediaStream,
                              nsIDOMLocalMediaStream)
 
-NS_IMPL_CYCLE_COLLECTION_INHERITED_1(DOMAudioNodeMediaStream, DOMMediaStream,
-                                     mStreamNode)
+NS_IMPL_CYCLE_COLLECTION_INHERITED(DOMAudioNodeMediaStream, DOMMediaStream,
+                                   mStreamNode)
 
 NS_IMPL_ADDREF_INHERITED(DOMAudioNodeMediaStream, DOMMediaStream)
 NS_IMPL_RELEASE_INHERITED(DOMAudioNodeMediaStream, DOMMediaStream)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(DOMAudioNodeMediaStream)
 NS_INTERFACE_MAP_END_INHERITING(DOMMediaStream)
 
 class DOMMediaStream::StreamListener : public MediaStreamListener {
--- a/content/media/MediaRecorder.cpp
+++ b/content/media/MediaRecorder.cpp
@@ -28,18 +28,18 @@ PRLogModuleInfo* gMediaRecorderLog;
 #else
 #define LOG(type, msg)
 #endif
 
 namespace mozilla {
 
 namespace dom {
 
-NS_IMPL_CYCLE_COLLECTION_INHERITED_1(MediaRecorder, DOMEventTargetHelper,
-                                     mStream)
+NS_IMPL_CYCLE_COLLECTION_INHERITED(MediaRecorder, DOMEventTargetHelper,
+                                   mStream)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(MediaRecorder)
 NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper)
 
 NS_IMPL_ADDREF_INHERITED(MediaRecorder, DOMEventTargetHelper)
 NS_IMPL_RELEASE_INHERITED(MediaRecorder, DOMEventTargetHelper)
 
 /**
--- a/content/media/MediaStreamTrack.cpp
+++ b/content/media/MediaStreamTrack.cpp
@@ -26,18 +26,18 @@ MediaStreamTrack::MediaStreamTrack(DOMMe
     uuidgen->GenerateUUIDInPlace(&mID);
   }
 }
 
 MediaStreamTrack::~MediaStreamTrack()
 {
 }
 
-NS_IMPL_CYCLE_COLLECTION_INHERITED_1(MediaStreamTrack, DOMEventTargetHelper,
-                                     mStream)
+NS_IMPL_CYCLE_COLLECTION_INHERITED(MediaStreamTrack, DOMEventTargetHelper,
+                                   mStream)
 
 NS_IMPL_ADDREF_INHERITED(MediaStreamTrack, DOMEventTargetHelper)
 NS_IMPL_RELEASE_INHERITED(MediaStreamTrack, DOMEventTargetHelper)
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(MediaStreamTrack)
 NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper)
 
 void
 MediaStreamTrack::GetId(nsAString& aID)
--- a/content/media/TextTrack.cpp
+++ b/content/media/TextTrack.cpp
@@ -11,22 +11,22 @@
 #include "mozilla/dom/TextTrackCueList.h"
 #include "mozilla/dom/TextTrackRegion.h"
 #include "mozilla/dom/HTMLMediaElement.h"
 #include "mozilla/dom/HTMLTrackElement.h"
 
 namespace mozilla {
 namespace dom {
 
-NS_IMPL_CYCLE_COLLECTION_INHERITED_4(TextTrack,
-                                     DOMEventTargetHelper,
-                                     mCueList,
-                                     mActiveCueList,
-                                     mTextTrackList,
-                                     mTrackElement)
+NS_IMPL_CYCLE_COLLECTION_INHERITED(TextTrack,
+                                   DOMEventTargetHelper,
+                                   mCueList,
+                                   mActiveCueList,
+                                   mTextTrackList,
+                                   mTrackElement)
 
 NS_IMPL_ADDREF_INHERITED(TextTrack, DOMEventTargetHelper)
 NS_IMPL_RELEASE_INHERITED(TextTrack, DOMEventTargetHelper)
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(TextTrack)
 NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper)
 
 TextTrack::TextTrack(nsPIDOMWindow* aOwnerWindow,
                      TextTrackKind aKind,
--- a/content/media/TextTrackCue.cpp
+++ b/content/media/TextTrackCue.cpp
@@ -7,23 +7,23 @@
 #include "mozilla/dom/TextTrackCue.h"
 #include "mozilla/dom/TextTrackRegion.h"
 #include "nsComponentManagerUtils.h"
 #include "mozilla/ClearOnShutdown.h"
 
 namespace mozilla {
 namespace dom {
 
-NS_IMPL_CYCLE_COLLECTION_INHERITED_5(TextTrackCue,
-                                     DOMEventTargetHelper,
-                                     mDocument,
-                                     mTrack,
-                                     mTrackElement,
-                                     mDisplayState,
-                                     mRegion)
+NS_IMPL_CYCLE_COLLECTION_INHERITED(TextTrackCue,
+                                   DOMEventTargetHelper,
+                                   mDocument,
+                                   mTrack,
+                                   mTrackElement,
+                                   mDisplayState,
+                                   mRegion)
 
 NS_IMPL_ADDREF_INHERITED(TextTrackCue, DOMEventTargetHelper)
 NS_IMPL_RELEASE_INHERITED(TextTrackCue, DOMEventTargetHelper)
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(TextTrackCue)
 NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper)
 
 StaticRefPtr<nsIWebVTTParserWrapper> TextTrackCue::sParserWrapper;
 
--- a/content/media/TextTrackList.cpp
+++ b/content/media/TextTrackList.cpp
@@ -8,20 +8,20 @@
 #include "mozilla/dom/TrackEvent.h"
 #include "nsThreadUtils.h"
 #include "mozilla/dom/TextTrackCue.h"
 #include "mozilla/dom/TextTrackManager.h"
 
 namespace mozilla {
 namespace dom {
 
-NS_IMPL_CYCLE_COLLECTION_INHERITED_2(TextTrackList,
-                                     DOMEventTargetHelper,
-                                     mTextTracks,
-                                     mTextTrackManager)
+NS_IMPL_CYCLE_COLLECTION_INHERITED(TextTrackList,
+                                   DOMEventTargetHelper,
+                                   mTextTracks,
+                                   mTextTrackManager)
 
 NS_IMPL_ADDREF_INHERITED(TextTrackList, DOMEventTargetHelper)
 NS_IMPL_RELEASE_INHERITED(TextTrackList, DOMEventTargetHelper)
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(TextTrackList)
 NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper)
 
 TextTrackList::TextTrackList(nsPIDOMWindow* aOwnerWindow)
   : DOMEventTargetHelper(aOwnerWindow)
--- a/content/media/WebVTTListener.cpp
+++ b/content/media/WebVTTListener.cpp
@@ -10,17 +10,17 @@
 #include "mozilla/dom/HTMLTrackElement.h"
 #include "nsIInputStream.h"
 #include "nsIWebVTTParserWrapper.h"
 #include "nsComponentManagerUtils.h"
 
 namespace mozilla {
 namespace dom {
 
-NS_IMPL_CYCLE_COLLECTION_2(WebVTTListener, mElement, mParserWrapper)
+NS_IMPL_CYCLE_COLLECTION(WebVTTListener, mElement, mParserWrapper)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(WebVTTListener)
   NS_INTERFACE_MAP_ENTRY(nsIWebVTTListener)
   NS_INTERFACE_MAP_ENTRY(nsIStreamListener)
   NS_INTERFACE_MAP_ENTRY(nsIChannelEventSink)
   NS_INTERFACE_MAP_ENTRY(nsIInterfaceRequestor)
   NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIWebVTTListener)
 NS_INTERFACE_MAP_END
--- a/content/media/mediasource/MediaSource.cpp
+++ b/content/media/mediasource/MediaSource.cpp
@@ -385,18 +385,18 @@ MediaSource::WrapObject(JSContext* aCx)
 void
 MediaSource::NotifyEvicted(double aStart, double aEnd)
 {
   // Cycle through all SourceBuffers and tell them to evict data in
   // the given range.
   mSourceBuffers->Evict(aStart, aEnd);
 }
 
-NS_IMPL_CYCLE_COLLECTION_INHERITED_2(MediaSource, DOMEventTargetHelper,
-                                     mSourceBuffers, mActiveSourceBuffers)
+NS_IMPL_CYCLE_COLLECTION_INHERITED(MediaSource, DOMEventTargetHelper,
+                                   mSourceBuffers, mActiveSourceBuffers)
 
 NS_IMPL_ADDREF_INHERITED(MediaSource, DOMEventTargetHelper)
 NS_IMPL_RELEASE_INHERITED(MediaSource, DOMEventTargetHelper)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(MediaSource)
   NS_INTERFACE_MAP_ENTRY(mozilla::dom::MediaSource)
 NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper)
 
--- a/content/media/mediasource/SourceBuffer.cpp
+++ b/content/media/mediasource/SourceBuffer.cpp
@@ -494,18 +494,18 @@ bool
 SourceBuffer::ContainsTime(double aTime)
 {
   double start = 0.0;
   double end = 0.0;
   GetBufferedStartEndTime(&start, &end);
   return aTime >= start && aTime <= end;
 }
 
-NS_IMPL_CYCLE_COLLECTION_INHERITED_1(SourceBuffer, DOMEventTargetHelper,
-                                     mMediaSource)
+NS_IMPL_CYCLE_COLLECTION_INHERITED(SourceBuffer, DOMEventTargetHelper,
+                                   mMediaSource)
 
 NS_IMPL_ADDREF_INHERITED(SourceBuffer, DOMEventTargetHelper)
 NS_IMPL_RELEASE_INHERITED(SourceBuffer, DOMEventTargetHelper)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(SourceBuffer)
 NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper)
 
 } // namespace dom
--- a/content/media/mediasource/SourceBufferList.cpp
+++ b/content/media/mediasource/SourceBufferList.cpp
@@ -159,18 +159,18 @@ SourceBufferList::GetParentObject() cons
 }
 
 JSObject*
 SourceBufferList::WrapObject(JSContext* aCx)
 {
   return SourceBufferListBinding::Wrap(aCx, this);
 }
 
-NS_IMPL_CYCLE_COLLECTION_INHERITED_2(SourceBufferList, DOMEventTargetHelper,
-                                     mMediaSource, mSourceBuffers)
+NS_IMPL_CYCLE_COLLECTION_INHERITED(SourceBufferList, DOMEventTargetHelper,
+                                   mMediaSource, mSourceBuffers)
 
 NS_IMPL_ADDREF_INHERITED(SourceBufferList, DOMEventTargetHelper)
 NS_IMPL_RELEASE_INHERITED(SourceBufferList, DOMEventTargetHelper)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(SourceBufferList)
 NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper)
 
 } // namespace dom
--- a/content/media/webaudio/AudioDestinationNode.cpp
+++ b/content/media/webaudio/AudioDestinationNode.cpp
@@ -209,18 +209,18 @@ private:
   float mVolume;
 };
 
 static bool UseAudioChannelService()
 {
   return Preferences::GetBool("media.useAudioChannelService");
 }
 
-NS_IMPL_CYCLE_COLLECTION_INHERITED_1(AudioDestinationNode, AudioNode,
-                                     mAudioChannelAgent)
+NS_IMPL_CYCLE_COLLECTION_INHERITED(AudioDestinationNode, AudioNode,
+                                   mAudioChannelAgent)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(AudioDestinationNode)
   NS_INTERFACE_MAP_ENTRY(nsIDOMEventListener)
   NS_INTERFACE_MAP_ENTRY(nsIAudioChannelAgentCallback)
   NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference)
 NS_INTERFACE_MAP_END_INHERITING(AudioNode)
 
 NS_IMPL_ADDREF_INHERITED(AudioDestinationNode, AudioNode)
--- a/content/media/webaudio/AudioProcessingEvent.cpp
+++ b/content/media/webaudio/AudioProcessingEvent.cpp
@@ -6,18 +6,18 @@
 
 #include "AudioProcessingEvent.h"
 #include "mozilla/dom/AudioProcessingEventBinding.h"
 #include "AudioContext.h"
 
 namespace mozilla {
 namespace dom {
 
-NS_IMPL_CYCLE_COLLECTION_INHERITED_3(AudioProcessingEvent, Event,
-                                     mInputBuffer, mOutputBuffer, mNode)
+NS_IMPL_CYCLE_COLLECTION_INHERITED(AudioProcessingEvent, Event,
+                                   mInputBuffer, mOutputBuffer, mNode)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(AudioProcessingEvent)
 NS_INTERFACE_MAP_END_INHERITING(Event)
 
 NS_IMPL_ADDREF_INHERITED(AudioProcessingEvent, Event)
 NS_IMPL_RELEASE_INHERITED(AudioProcessingEvent, Event)
 
 AudioProcessingEvent::AudioProcessingEvent(ScriptProcessorNode* aOwner,
--- a/content/media/webaudio/BiquadFilterNode.cpp
+++ b/content/media/webaudio/BiquadFilterNode.cpp
@@ -12,18 +12,18 @@
 #include "WebAudioUtils.h"
 #include "blink/Biquad.h"
 #include "mozilla/Preferences.h"
 #include "AudioParamTimeline.h"
 
 namespace mozilla {
 namespace dom {
 
-NS_IMPL_CYCLE_COLLECTION_INHERITED_4(BiquadFilterNode, AudioNode,
-                                     mFrequency, mDetune, mQ, mGain)
+NS_IMPL_CYCLE_COLLECTION_INHERITED(BiquadFilterNode, AudioNode,
+                                   mFrequency, mDetune, mQ, mGain)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(BiquadFilterNode)
 NS_INTERFACE_MAP_END_INHERITING(AudioNode)
 
 NS_IMPL_ADDREF_INHERITED(BiquadFilterNode, AudioNode)
 NS_IMPL_RELEASE_INHERITED(BiquadFilterNode, AudioNode)
 
 static void
--- a/content/media/webaudio/ConvolverNode.cpp
+++ b/content/media/webaudio/ConvolverNode.cpp
@@ -9,17 +9,17 @@
 #include "AudioNodeEngine.h"
 #include "AudioNodeStream.h"
 #include "blink/Reverb.h"
 #include "PlayingRefChangeHandler.h"
 
 namespace mozilla {
 namespace dom {
 
-NS_IMPL_CYCLE_COLLECTION_INHERITED_1(ConvolverNode, AudioNode, mBuffer)
+NS_IMPL_CYCLE_COLLECTION_INHERITED(ConvolverNode, AudioNode, mBuffer)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(ConvolverNode)
 NS_INTERFACE_MAP_END_INHERITING(AudioNode)
 
 NS_IMPL_ADDREF_INHERITED(ConvolverNode, AudioNode)
 NS_IMPL_RELEASE_INHERITED(ConvolverNode, AudioNode)
 
 class ConvolverNodeEngine : public AudioNodeEngine
--- a/content/media/webaudio/DelayNode.cpp
+++ b/content/media/webaudio/DelayNode.cpp
@@ -11,18 +11,18 @@
 #include "AudioDestinationNode.h"
 #include "WebAudioUtils.h"
 #include "DelayBuffer.h"
 #include "PlayingRefChangeHandler.h"
 
 namespace mozilla {
 namespace dom {
 
-NS_IMPL_CYCLE_COLLECTION_INHERITED_1(DelayNode, AudioNode,
-                                     mDelay)
+NS_IMPL_CYCLE_COLLECTION_INHERITED(DelayNode, AudioNode,
+                                   mDelay)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(DelayNode)
 NS_INTERFACE_MAP_END_INHERITING(AudioNode)
 
 NS_IMPL_ADDREF_INHERITED(DelayNode, AudioNode)
 NS_IMPL_RELEASE_INHERITED(DelayNode, AudioNode)
 
 class DelayNodeEngine : public AudioNodeEngine
--- a/content/media/webaudio/DynamicsCompressorNode.cpp
+++ b/content/media/webaudio/DynamicsCompressorNode.cpp
@@ -12,23 +12,23 @@
 #include "WebAudioUtils.h"
 #include "blink/DynamicsCompressor.h"
 
 using WebCore::DynamicsCompressor;
 
 namespace mozilla {
 namespace dom {
 
-NS_IMPL_CYCLE_COLLECTION_INHERITED_6(DynamicsCompressorNode, AudioNode,
-                                     mThreshold,
-                                     mKnee,
-                                     mRatio,
-                                     mReduction,
-                                     mAttack,
-                                     mRelease)
+NS_IMPL_CYCLE_COLLECTION_INHERITED(DynamicsCompressorNode, AudioNode,
+                                   mThreshold,
+                                   mKnee,
+                                   mRatio,
+                                   mReduction,
+                                   mAttack,
+                                   mRelease)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(DynamicsCompressorNode)
 NS_INTERFACE_MAP_END_INHERITING(AudioNode)
 
 NS_IMPL_ADDREF_INHERITED(DynamicsCompressorNode, AudioNode)
 NS_IMPL_RELEASE_INHERITED(DynamicsCompressorNode, AudioNode)
 
 class DynamicsCompressorNodeEngine : public AudioNodeEngine
--- a/content/media/webaudio/GainNode.cpp
+++ b/content/media/webaudio/GainNode.cpp
@@ -9,18 +9,18 @@
 #include "AudioNodeEngine.h"
 #include "AudioNodeStream.h"
 #include "AudioDestinationNode.h"
 #include "WebAudioUtils.h"
 
 namespace mozilla {
 namespace dom {
 
-NS_IMPL_CYCLE_COLLECTION_INHERITED_1(GainNode, AudioNode,
-                                     mGain)
+NS_IMPL_CYCLE_COLLECTION_INHERITED(GainNode, AudioNode,
+                                   mGain)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(GainNode)
 NS_INTERFACE_MAP_END_INHERITING(AudioNode)
 
 NS_IMPL_ADDREF_INHERITED(GainNode, AudioNode)
 NS_IMPL_RELEASE_INHERITED(GainNode, AudioNode)
 
 class GainNodeEngine : public AudioNodeEngine
--- a/content/media/webaudio/MediaStreamAudioDestinationNode.cpp
+++ b/content/media/webaudio/MediaStreamAudioDestinationNode.cpp
@@ -10,17 +10,17 @@
 #include "AudioNodeEngine.h"
 #include "AudioNodeStream.h"
 #include "DOMMediaStream.h"
 #include "TrackUnionStream.h"
 
 namespace mozilla {
 namespace dom {
 
-NS_IMPL_CYCLE_COLLECTION_INHERITED_1(MediaStreamAudioDestinationNode, AudioNode, mDOMStream)
+NS_IMPL_CYCLE_COLLECTION_INHERITED(MediaStreamAudioDestinationNode, AudioNode, mDOMStream)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(MediaStreamAudioDestinationNode)
 NS_INTERFACE_MAP_END_INHERITING(AudioNode)
 
 NS_IMPL_ADDREF_INHERITED(MediaStreamAudioDestinationNode, AudioNode)
 NS_IMPL_RELEASE_INHERITED(MediaStreamAudioDestinationNode, AudioNode)
 
 static const int MEDIA_STREAM_DEST_TRACK_ID = 2;
--- a/content/media/webaudio/OfflineAudioCompletionEvent.cpp
+++ b/content/media/webaudio/OfflineAudioCompletionEvent.cpp
@@ -6,18 +6,18 @@
 
 #include "OfflineAudioCompletionEvent.h"
 #include "mozilla/dom/OfflineAudioCompletionEventBinding.h"
 #include "AudioContext.h"
 
 namespace mozilla {
 namespace dom {
 
-NS_IMPL_CYCLE_COLLECTION_INHERITED_1(OfflineAudioCompletionEvent, Event,
-                                     mRenderedBuffer)
+NS_IMPL_CYCLE_COLLECTION_INHERITED(OfflineAudioCompletionEvent, Event,
+                                   mRenderedBuffer)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(OfflineAudioCompletionEvent)
 NS_INTERFACE_MAP_END_INHERITING(Event)
 
 NS_IMPL_ADDREF_INHERITED(OfflineAudioCompletionEvent, Event)
 NS_IMPL_RELEASE_INHERITED(OfflineAudioCompletionEvent, Event)
 
 OfflineAudioCompletionEvent::OfflineAudioCompletionEvent(AudioContext* aOwner,
--- a/content/media/webaudio/OscillatorNode.cpp
+++ b/content/media/webaudio/OscillatorNode.cpp
@@ -9,18 +9,18 @@
 #include "AudioNodeStream.h"
 #include "AudioDestinationNode.h"
 #include "WebAudioUtils.h"
 #include "blink/PeriodicWave.h"
 
 namespace mozilla {
 namespace dom {
 
-NS_IMPL_CYCLE_COLLECTION_INHERITED_3(OscillatorNode, AudioNode,
-                                     mPeriodicWave, mFrequency, mDetune)
+NS_IMPL_CYCLE_COLLECTION_INHERITED(OscillatorNode, AudioNode,
+                                   mPeriodicWave, mFrequency, mDetune)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(OscillatorNode)
 NS_INTERFACE_MAP_END_INHERITING(AudioNode)
 
 NS_IMPL_ADDREF_INHERITED(OscillatorNode, AudioNode)
 NS_IMPL_RELEASE_INHERITED(OscillatorNode, AudioNode)
 
 static const float sLeakTriangle = 0.995f;
--- a/content/media/webspeech/synth/SpeechSynthesisUtterance.cpp
+++ b/content/media/webspeech/synth/SpeechSynthesisUtterance.cpp
@@ -13,18 +13,18 @@
 
 #include "mozilla/dom/SpeechSynthesisUtteranceBinding.h"
 #include "SpeechSynthesisUtterance.h"
 #include "SpeechSynthesisVoice.h"
 
 namespace mozilla {
 namespace dom {
 
-NS_IMPL_CYCLE_COLLECTION_INHERITED_1(SpeechSynthesisUtterance,
-                                     DOMEventTargetHelper, mVoice);
+NS_IMPL_CYCLE_COLLECTION_INHERITED(SpeechSynthesisUtterance,
+                                   DOMEventTargetHelper, mVoice);
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(SpeechSynthesisUtterance)
   NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
 NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper)
 
 NS_IMPL_ADDREF_INHERITED(SpeechSynthesisUtterance, DOMEventTargetHelper)
 NS_IMPL_RELEASE_INHERITED(SpeechSynthesisUtterance, DOMEventTargetHelper)
 
--- a/content/media/webspeech/synth/nsSpeechTask.cpp
+++ b/content/media/webspeech/synth/nsSpeechTask.cpp
@@ -76,17 +76,17 @@ private:
   // and 'mSpeechTask' exclusively owns it and therefor exists as well.
   nsSpeechTask* mSpeechTask;
 
   bool mStarted;
 };
 
 // nsSpeechTask
 
-NS_IMPL_CYCLE_COLLECTION_2(nsSpeechTask, mSpeechSynthesis, mUtterance);
+NS_IMPL_CYCLE_COLLECTION(nsSpeechTask, mSpeechSynthesis, mUtterance);
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsSpeechTask)
   NS_INTERFACE_MAP_ENTRY(nsISpeechTask)
   NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsISpeechTask)
 NS_INTERFACE_MAP_END
 
 NS_IMPL_CYCLE_COLLECTING_ADDREF(nsSpeechTask)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(nsSpeechTask)
--- a/content/svg/content/src/DOMSVGLength.cpp
+++ b/content/svg/content/src/DOMSVGLength.cpp
@@ -19,17 +19,17 @@
 // See the architecture comment in DOMSVGAnimatedLengthList.h.
 
 namespace mozilla {
 
 static nsSVGAttrTearoffTable<nsSVGLength2, DOMSVGLength>
   sBaseSVGLengthTearOffTable,
   sAnimSVGLengthTearOffTable;
 
-// We could use NS_IMPL_CYCLE_COLLECTION_1, except that in Unlink() we need to
+// We could use NS_IMPL_CYCLE_COLLECTION(, except that in Unlink() we need to
 // clear our list's weak ref to us to be safe. (The other option would be to
 // not unlink and rely on the breaking of the other edges in the cycle, as
 // NS_SVG_VAL_IMPL_CYCLE_COLLECTION does.)
 NS_IMPL_CYCLE_COLLECTION_CLASS(DOMSVGLength)
 
 NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(DOMSVGLength)
   // We may not belong to a list, so we must null check tmp->mList.
   if (tmp->mList) {
--- a/content/svg/content/src/DOMSVGLengthList.cpp
+++ b/content/svg/content/src/DOMSVGLengthList.cpp
@@ -30,17 +30,17 @@ void UpdateListIndicesFromIndex(Fallible
     }
   }
 }
 
 } // namespace
 
 namespace mozilla {
 
-// We could use NS_IMPL_CYCLE_COLLECTION_1, except that in Unlink() we need to
+// We could use NS_IMPL_CYCLE_COLLECTION(, except that in Unlink() we need to
 // clear our DOMSVGAnimatedLengthList's weak ref to us to be safe. (The other
 // option would be to not unlink and rely on the breaking of the other edges in
 // the cycle, as NS_SVG_VAL_IMPL_CYCLE_COLLECTION does.)
 NS_IMPL_CYCLE_COLLECTION_CLASS(DOMSVGLengthList)
 
 NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(DOMSVGLengthList)
   if (tmp->mAList) {
     if (tmp->IsAnimValList()) {
--- a/content/svg/content/src/DOMSVGNumber.cpp
+++ b/content/svg/content/src/DOMSVGNumber.cpp
@@ -11,17 +11,17 @@
 #include "nsIDOMSVGNumber.h"
 #include "nsError.h"
 #include "nsContentUtils.h" // for NS_ENSURE_FINITE
 
 // See the architecture comment in DOMSVGAnimatedNumberList.h.
 
 namespace mozilla {
 
-// We could use NS_IMPL_CYCLE_COLLECTION_1, except that in Unlink() we need to
+// We could use NS_IMPL_CYCLE_COLLECTION(, except that in Unlink() we need to
 // clear our list's weak ref to us to be safe. (The other option would be to
 // not unlink and rely on the breaking of the other edges in the cycle, as
 // NS_SVG_VAL_IMPL_CYCLE_COLLECTION does.)
 NS_IMPL_CYCLE_COLLECTION_CLASS(DOMSVGNumber)
 
 NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(DOMSVGNumber)
   // We may not belong to a list, so we must null check tmp->mList.
   if (tmp->mList) {
--- a/content/svg/content/src/DOMSVGNumberList.cpp
+++ b/content/svg/content/src/DOMSVGNumberList.cpp
@@ -30,17 +30,17 @@ void UpdateListIndicesFromIndex(Fallible
     }
   }
 }
 
 } // namespace
 
 namespace mozilla {
 
-// We could use NS_IMPL_CYCLE_COLLECTION_1, except that in Unlink() we need to
+// We could use NS_IMPL_CYCLE_COLLECTION(, except that in Unlink() we need to
 // clear our DOMSVGAnimatedNumberList's weak ref to us to be safe. (The other
 // option would be to not unlink and rely on the breaking of the other edges in
 // the cycle, as NS_SVG_VAL_IMPL_CYCLE_COLLECTION does.)
 NS_IMPL_CYCLE_COLLECTION_CLASS(DOMSVGNumberList)
 
 NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(DOMSVGNumberList)
   if (tmp->mAList) {
     if (tmp->IsAnimValList()) {
--- a/content/svg/content/src/DOMSVGPathSeg.cpp
+++ b/content/svg/content/src/DOMSVGPathSeg.cpp
@@ -8,17 +8,17 @@
 #include "SVGAnimatedPathSegList.h"
 #include "nsSVGElement.h"
 #include "nsError.h"
 
 // See the architecture comment in DOMSVGPathSegList.h.
 
 namespace mozilla {
 
-// We could use NS_IMPL_CYCLE_COLLECTION_1, except that in Unlink() we need to
+// We could use NS_IMPL_CYCLE_COLLECTION(, except that in Unlink() we need to
 // clear our list's weak ref to us to be safe. (The other option would be to
 // not unlink and rely on the breaking of the other edges in the cycle, as
 // NS_SVG_VAL_IMPL_CYCLE_COLLECTION does.)
 NS_IMPL_CYCLE_COLLECTION_CLASS(DOMSVGPathSeg)
 
 NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(DOMSVGPathSeg)
   // We may not belong to a list, so we must null check tmp->mList.
   if (tmp->mList) {
--- a/content/svg/content/src/DOMSVGTransformList.cpp
+++ b/content/svg/content/src/DOMSVGTransformList.cpp
@@ -29,17 +29,17 @@ void UpdateListIndicesFromIndex(
 }
 
 } // anonymous namespace
 
 namespace mozilla {
 
 using namespace dom;
 
-// We could use NS_IMPL_CYCLE_COLLECTION_1, except that in Unlink() we need to
+// We could use NS_IMPL_CYCLE_COLLECTION(, except that in Unlink() we need to
 // clear our SVGAnimatedTransformList's weak ref to us to be safe. (The other
 // option would be to not unlink and rely on the breaking of the other edges in
 // the cycle, as NS_SVG_VAL_IMPL_CYCLE_COLLECTION does.)
 NS_IMPL_CYCLE_COLLECTION_CLASS(DOMSVGTransformList)
 
 NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(DOMSVGTransformList)
   if (tmp->mAList) {
     if (tmp->IsAnimValList()) {
--- a/content/svg/content/src/SVGSVGElement.cpp
+++ b/content/svg/content/src/SVGSVGElement.cpp
@@ -50,18 +50,18 @@ namespace dom {
 class SVGAnimatedLength;
 
 JSObject*
 SVGSVGElement::WrapNode(JSContext *aCx)
 {
   return SVGSVGElementBinding::Wrap(aCx, this);
 }
 
-NS_IMPL_CYCLE_COLLECTION_INHERITED_1(DOMSVGTranslatePoint, nsISVGPoint,
-                                     mElement)
+NS_IMPL_CYCLE_COLLECTION_INHERITED(DOMSVGTranslatePoint, nsISVGPoint,
+                                   mElement)
 
 NS_IMPL_ADDREF_INHERITED(DOMSVGTranslatePoint, nsISVGPoint)
 NS_IMPL_RELEASE_INHERITED(DOMSVGTranslatePoint, nsISVGPoint)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(DOMSVGTranslatePoint)
   NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
   // We have to qualify nsISVGPoint because NS_GET_IID looks for a class in the
   // global namespace
--- a/content/svg/content/src/SVGSwitchElement.cpp
+++ b/content/svg/content/src/SVGSwitchElement.cpp
@@ -21,18 +21,18 @@ JSObject*
 SVGSwitchElement::WrapNode(JSContext *aCx)
 {
   return SVGSwitchElementBinding::Wrap(aCx, this);
 }
 
 //----------------------------------------------------------------------
 // nsISupports methods
 
-NS_IMPL_CYCLE_COLLECTION_INHERITED_1(SVGSwitchElement, SVGSwitchElementBase,
-                                     mActiveChild)
+NS_IMPL_CYCLE_COLLECTION_INHERITED(SVGSwitchElement, SVGSwitchElementBase,
+                                   mActiveChild)
 
 NS_IMPL_ADDREF_INHERITED(SVGSwitchElement,SVGSwitchElementBase)
 NS_IMPL_RELEASE_INHERITED(SVGSwitchElement,SVGSwitchElementBase)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(SVGSwitchElement)
 NS_INTERFACE_MAP_END_INHERITING(SVGSwitchElementBase)
 
 //----------------------------------------------------------------------
--- a/content/svg/content/src/SVGTransform.cpp
+++ b/content/svg/content/src/SVGTransform.cpp
@@ -25,17 +25,17 @@ static nsSVGAttrTearoffTable<SVGTransfor
 SVGMatrixTearoffTable()
 {
   static nsSVGAttrTearoffTable<SVGTransform, SVGMatrix> sSVGMatrixTearoffTable;
   return sSVGMatrixTearoffTable;
 }
 
 //----------------------------------------------------------------------
 
-// We could use NS_IMPL_CYCLE_COLLECTION_1, except that in Unlink() we need to
+// We could use NS_IMPL_CYCLE_COLLECTION(, except that in Unlink() we need to
 // clear our list's weak ref to us to be safe. (The other option would be to
 // not unlink and rely on the breaking of the other edges in the cycle, as
 // NS_SVG_VAL_IMPL_CYCLE_COLLECTION does.)
 NS_IMPL_CYCLE_COLLECTION_CLASS(SVGTransform)
 
 NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(SVGTransform)
   // We may not belong to a list, so we must null check tmp->mList.
   if (tmp->mList) {
--- a/content/svg/content/src/SVGZoomEvent.cpp
+++ b/content/svg/content/src/SVGZoomEvent.cpp
@@ -12,17 +12,17 @@
 #include "prtime.h"
 
 namespace mozilla {
 namespace dom {
 
 //----------------------------------------------------------------------
 // Implementation
 
-NS_IMPL_CYCLE_COLLECTION_INHERITED_2(SVGZoomEvent, UIEvent, mPreviousTranslate, mNewTranslate)
+NS_IMPL_CYCLE_COLLECTION_INHERITED(SVGZoomEvent, UIEvent, mPreviousTranslate, mNewTranslate)
 
 NS_IMPL_ADDREF_INHERITED(SVGZoomEvent, UIEvent)
 NS_IMPL_RELEASE_INHERITED(SVGZoomEvent, UIEvent)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(SVGZoomEvent)
 NS_INTERFACE_MAP_END_INHERITING(UIEvent)
 
 SVGZoomEvent::SVGZoomEvent(EventTarget* aOwner,
--- a/content/svg/content/src/nsISVGPoint.cpp
+++ b/content/svg/content/src/nsISVGPoint.cpp
@@ -9,17 +9,17 @@
 #include "nsSVGElement.h"
 #include "nsError.h"
 #include "mozilla/dom/SVGPointBinding.h"
 
 // See the architecture comment in DOMSVGPointList.h.
 
 using namespace mozilla;
 
-// We could use NS_IMPL_CYCLE_COLLECTION_1, except that in Unlink() we need to
+// We could use NS_IMPL_CYCLE_COLLECTION(, except that in Unlink() we need to
 // clear our list's weak ref to us to be safe. (The other option would be to
 // not unlink and rely on the breaking of the other edges in the cycle, as
 // NS_SVG_VAL_IMPL_CYCLE_COLLECTION does.)
 NS_IMPL_CYCLE_COLLECTION_CLASS(nsISVGPoint)
 
 NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(nsISVGPoint)
   // We may not belong to a list, so we must null check tmp->mList.
   if (tmp->mList) {
--- a/content/xul/content/src/nsXULContextMenuBuilder.cpp
+++ b/content/xul/content/src/nsXULContextMenuBuilder.cpp
@@ -19,18 +19,18 @@ nsXULContextMenuBuilder::nsXULContextMen
   : mCurrentGeneratedItemId(0)
 {
 }
 
 nsXULContextMenuBuilder::~nsXULContextMenuBuilder()
 {
 }
 
-NS_IMPL_CYCLE_COLLECTION_4(nsXULContextMenuBuilder, mFragment, mDocument,
-                           mCurrentNode, mElements)
+NS_IMPL_CYCLE_COLLECTION(nsXULContextMenuBuilder, mFragment, mDocument,
+                         mCurrentNode, mElements)
 
 NS_IMPL_CYCLE_COLLECTING_ADDREF(nsXULContextMenuBuilder)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(nsXULContextMenuBuilder)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsXULContextMenuBuilder)
   NS_INTERFACE_MAP_ENTRY(nsIMenuBuilder)
   NS_INTERFACE_MAP_ENTRY(nsIXULContextMenuBuilder)
   NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIMenuBuilder)
--- a/content/xul/content/src/nsXULElement.cpp
+++ b/content/xul/content/src/nsXULElement.cpp
@@ -139,17 +139,17 @@ public:
     NS_ADDREF(*aStyle = element->Style());
     return NS_OK;
   }
   NS_FORWARD_NSIFRAMELOADEROWNER(static_cast<nsXULElement*>(mElement.get())->)
 private:
   nsCOMPtr<nsIDOMXULElement> mElement;
 };
 
-NS_IMPL_CYCLE_COLLECTION_1(nsXULElementTearoff, mElement)
+NS_IMPL_CYCLE_COLLECTION(nsXULElementTearoff, mElement)
 
 NS_IMPL_CYCLE_COLLECTING_ADDREF(nsXULElementTearoff)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(nsXULElementTearoff)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsXULElementTearoff)
   NS_INTERFACE_MAP_ENTRY(nsIFrameLoaderOwner)
   NS_INTERFACE_MAP_ENTRY(nsIDOMElementCSSInlineStyle)
 NS_INTERFACE_MAP_END_AGGREGATED(mElement)
--- a/content/xul/content/src/nsXULPopupListener.cpp
+++ b/content/xul/content/src/nsXULPopupListener.cpp
@@ -61,17 +61,17 @@ nsXULPopupListener::nsXULPopupListener(m
 {
 }
 
 nsXULPopupListener::~nsXULPopupListener(void)
 {
   ClosePopup();
 }
 
-NS_IMPL_CYCLE_COLLECTION_2(nsXULPopupListener, mElement, mPopupContent)
+NS_IMPL_CYCLE_COLLECTION(nsXULPopupListener, mElement, mPopupContent)
 NS_IMPL_CYCLE_COLLECTING_ADDREF(nsXULPopupListener)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(nsXULPopupListener)
 
 NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_BEGIN(nsXULPopupListener)
   // If the owner, mElement, can be skipped, so can we.
   if (tmp->mElement) {
     return mozilla::dom::FragmentOrElement::CanSkip(tmp->mElement, true);
   }
--- a/content/xul/templates/src/nsRDFQuery.cpp
+++ b/content/xul/templates/src/nsRDFQuery.cpp
@@ -4,17 +4,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nscore.h"
 #include "nsCOMPtr.h"
 
 #include "nsXULTemplateQueryProcessorRDF.h"
 #include "nsRDFQuery.h"
 
-NS_IMPL_CYCLE_COLLECTION_1(nsRDFQuery, mQueryNode)
+NS_IMPL_CYCLE_COLLECTION(nsRDFQuery, mQueryNode)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsRDFQuery)
   NS_INTERFACE_MAP_ENTRY(nsITemplateRDFQuery)
   NS_INTERFACE_MAP_ENTRY(nsISupports)
 NS_INTERFACE_MAP_END
 
 NS_IMPL_CYCLE_COLLECTING_ADDREF(nsRDFQuery)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(nsRDFQuery)
--- a/content/xul/templates/src/nsXULTemplateResultRDF.cpp
+++ b/content/xul/templates/src/nsXULTemplateResultRDF.cpp
@@ -4,17 +4,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsXULTemplateResultRDF.h"
 #include "nsXULContentUtils.h"
 
 // XXXndeakin for some reason, making this class have classinfo breaks trees.
 //#include "nsIDOMClassInfo.h"
 
-NS_IMPL_CYCLE_COLLECTION_1(nsXULTemplateResultRDF, mQuery)
+NS_IMPL_CYCLE_COLLECTION(nsXULTemplateResultRDF, mQuery)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsXULTemplateResultRDF)
   NS_INTERFACE_MAP_ENTRY(nsIXULTemplateResult)
   NS_INTERFACE_MAP_ENTRY(nsISupports)
 NS_INTERFACE_MAP_END
 
 NS_IMPL_CYCLE_COLLECTING_ADDREF(nsXULTemplateResultRDF)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(nsXULTemplateResultRDF)
--- a/content/xul/templates/src/nsXULTreeBuilder.cpp
+++ b/content/xul/templates/src/nsXULTreeBuilder.cpp
@@ -268,21 +268,21 @@ NS_NewXULTreeBuilder(nsISupports* aOuter
 
     NS_RELEASE(result);
     return rv;
 }
 
 NS_IMPL_ADDREF_INHERITED(nsXULTreeBuilder, nsXULTemplateBuilder)
 NS_IMPL_RELEASE_INHERITED(nsXULTreeBuilder, nsXULTemplateBuilder)
 
-NS_IMPL_CYCLE_COLLECTION_INHERITED_4(nsXULTreeBuilder, nsXULTemplateBuilder,
-                                     mBoxObject,
-                                     mSelection,
-                                     mPersistStateStore,
-                                     mObservers)
+NS_IMPL_CYCLE_COLLECTION_INHERITED(nsXULTreeBuilder, nsXULTemplateBuilder,
+                                   mBoxObject,
+                                   mSelection,
+                                   mPersistStateStore,
+                                   mObservers)
 
 DOMCI_DATA(XULTreeBuilder, nsXULTreeBuilder)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(nsXULTreeBuilder)
     NS_INTERFACE_MAP_ENTRY(nsIXULTreeBuilder)
     NS_INTERFACE_MAP_ENTRY(nsITreeView)
     NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(XULTreeBuilder)
 NS_INTERFACE_MAP_END_INHERITING(nsXULTemplateBuilder)
--- a/dom/activities/src/Activity.cpp
+++ b/dom/activities/src/Activity.cpp
@@ -13,18 +13,18 @@
 using namespace mozilla::dom;
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(Activity)
 NS_INTERFACE_MAP_END_INHERITING(DOMRequest)
 
 NS_IMPL_ADDREF_INHERITED(Activity, DOMRequest)
 NS_IMPL_RELEASE_INHERITED(Activity, DOMRequest)
 
-NS_IMPL_CYCLE_COLLECTION_INHERITED_1(Activity, DOMRequest,
-                                     mProxy)
+NS_IMPL_CYCLE_COLLECTION_INHERITED(Activity, DOMRequest,
+                                   mProxy)
 
 NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN_INHERITED(Activity, DOMRequest)
 NS_IMPL_CYCLE_COLLECTION_TRACE_END
 
 /* virtual */ JSObject*
 Activity::WrapObject(JSContext* aCx)
 {
   return MozActivityBinding::Wrap(aCx, this);
--- a/dom/audiochannel/AudioChannelAgent.cpp
+++ b/dom/audiochannel/AudioChannelAgent.cpp
@@ -6,17 +6,17 @@
 #include "AudioChannelCommon.h"
 #include "AudioChannelService.h"
 #include "nsIDOMWindow.h"
 #include "nsPIDOMWindow.h"
 #include "nsXULAppAPI.h"
 
 using namespace mozilla::dom;
 
-NS_IMPL_CYCLE_COLLECTION_2(AudioChannelAgent, mWindow, mCallback)
+NS_IMPL_CYCLE_COLLECTION(AudioChannelAgent, mWindow, mCallback)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(AudioChannelAgent)
   NS_INTERFACE_MAP_ENTRY(nsIAudioChannelAgent)
   NS_INTERFACE_MAP_ENTRY(nsISupports)
 NS_INTERFACE_MAP_END
 
 NS_IMPL_CYCLE_COLLECTING_ADDREF(AudioChannelAgent)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(AudioChannelAgent)
--- a/dom/base/DOMCursor.cpp
+++ b/dom/base/DOMCursor.cpp
@@ -5,18 +5,18 @@
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "DOMCursor.h"
 #include "mozilla/dom/DOMCursorBinding.h"
 
 namespace mozilla {
 namespace dom {
 
-NS_IMPL_CYCLE_COLLECTION_INHERITED_1(DOMCursor, DOMRequest,
-                                     mCallback)
+NS_IMPL_CYCLE_COLLECTION_INHERITED(DOMCursor, DOMRequest,
+                                   mCallback)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(DOMCursor)
   NS_INTERFACE_MAP_ENTRY(nsIDOMDOMCursor)
 NS_INTERFACE_MAP_END_INHERITING(DOMRequest)
 
 NS_IMPL_ADDREF_INHERITED(DOMCursor, DOMRequest)
 NS_IMPL_RELEASE_INHERITED(DOMCursor, DOMRequest)
 
--- a/dom/base/PerformanceResourceTiming.cpp
+++ b/dom/base/PerformanceResourceTiming.cpp
@@ -3,19 +3,19 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "PerformanceResourceTiming.h"
 #include "mozilla/dom/PerformanceResourceTimingBinding.h"
 
 using namespace mozilla::dom;
 
-NS_IMPL_CYCLE_COLLECTION_INHERITED_1(PerformanceResourceTiming,
-                                     PerformanceEntry,
-                                     mTiming)
+NS_IMPL_CYCLE_COLLECTION_INHERITED(PerformanceResourceTiming,
+                                   PerformanceEntry,
+                                   mTiming)
 
 NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN_INHERITED(PerformanceResourceTiming,
                                                PerformanceEntry)
 NS_IMPL_CYCLE_COLLECTION_TRACE_END
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(PerformanceResourceTiming)
 NS_INTERFACE_MAP_END_INHERITING(PerformanceEntry)
 
--- a/dom/base/nsFocusManager.cpp
+++ b/dom/base/nsFocusManager.cpp
@@ -124,23 +124,23 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(
   NS_INTERFACE_MAP_ENTRY(nsIObserver)
   NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference)
   NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIFocusManager)
 NS_INTERFACE_MAP_END
 
 NS_IMPL_CYCLE_COLLECTING_ADDREF(nsFocusManager)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(nsFocusManager)
 
-NS_IMPL_CYCLE_COLLECTION_6(nsFocusManager,
-                           mActiveWindow,
-                           mFocusedWindow,
-                           mFocusedContent,
-                           mFirstBlurEvent,
-                           mFirstFocusEvent,
-                           mWindowBeingLowered)
+NS_IMPL_CYCLE_COLLECTION(nsFocusManager,
+                         mActiveWindow,
+                         mFocusedWindow,
+                         mFocusedContent,
+                         mFirstBlurEvent,
+                         mFirstFocusEvent,
+                         mWindowBeingLowered)
 
 nsFocusManager* nsFocusManager::sInstance = nullptr;
 bool nsFocusManager::sMouseFocusesFormControl = false;
 bool nsFocusManager::sTestMode = false;
 
 static const char* kObservedPrefs[] = {
   "accessibility.browsewithcaret",
   "accessibility.tabfocus_applies_to_xul",
--- a/dom/base/nsGlobalWindow.cpp
+++ b/dom/base/nsGlobalWindow.cpp
@@ -576,17 +576,17 @@ nsPIDOMWindow::nsPIDOMWindow(nsPIDOMWind
   // Make sure no actual window ends up with mWindowID == 0
   mWindowID(++gNextWindowID), mHasNotifiedGlobalCreated(false),
   mMarkedCCGeneration(0)
  {}
 
 nsPIDOMWindow::~nsPIDOMWindow() {}
 
 // DialogValueHolder CC goop.
-NS_IMPL_CYCLE_COLLECTION_1(DialogValueHolder, mValue)
+NS_IMPL_CYCLE_COLLECTION(DialogValueHolder, mValue)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(DialogValueHolder)
   NS_INTERFACE_MAP_ENTRY(nsISupports)
 NS_INTERFACE_MAP_END
 
 NS_IMPL_CYCLE_COLLECTING_ADDREF(DialogValueHolder)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(DialogValueHolder)
 
--- a/dom/bindings/Codegen.py
+++ b/dom/bindings/Codegen.py
@@ -12020,17 +12020,17 @@ class CGJSImplClass(CGBindingImplClass):
             constructorBody = dedent("""
                 // Make sure we're an nsWrapperCache already
                 MOZ_ASSERT(static_cast<nsWrapperCache*>(this));
                 // And that our ancestor has called SetIsDOMBinding()
                 MOZ_ASSERT(IsDOMBinding());
                 """)
             extradefinitions = fill(
                 """
-                NS_IMPL_CYCLE_COLLECTION_INHERITED_2(${ifaceName}, ${parentClass}, mImpl, mParent)
+                NS_IMPL_CYCLE_COLLECTION_INHERITED(${ifaceName}, ${parentClass}, mImpl, mParent)
                 NS_IMPL_ADDREF_INHERITED(${ifaceName}, ${parentClass})
                 NS_IMPL_RELEASE_INHERITED(${ifaceName}, ${parentClass})
                 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(${ifaceName})
                 NS_INTERFACE_MAP_END_INHERITING(${parentClass})
                 """,
                 ifaceName=self.descriptor.name,
                 parentClass=parentClass)
         else:
--- a/dom/bindings/Exceptions.cpp
+++ b/dom/bindings/Exceptions.cpp
@@ -339,17 +339,17 @@ JSStackFrame::JSStackFrame(StackDescript
     mLanguage = nsIProgrammingLanguage::UNKNOWN;
   }
 }
 
 JSStackFrame::~JSStackFrame()
 {
 }
 
-NS_IMPL_CYCLE_COLLECTION_2(JSStackFrame, mStackDescription, mCaller)
+NS_IMPL_CYCLE_COLLECTION(JSStackFrame, mStackDescription, mCaller)
 
 NS_IMPL_CYCLE_COLLECTING_ADDREF(JSStackFrame)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(JSStackFrame)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(JSStackFrame)
   NS_INTERFACE_MAP_ENTRY(nsIStackFrame)
   NS_INTERFACE_MAP_ENTRY(nsISupports)
 NS_INTERFACE_MAP_END
--- a/dom/camera/DOMCameraControl.cpp
+++ b/dom/camera/DOMCameraControl.cpp
@@ -40,37 +40,37 @@ using namespace mozilla::ipc;
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(nsDOMCameraControl)
   NS_INTERFACE_MAP_ENTRY(nsISupports)
   NS_INTERFACE_MAP_ENTRY(nsIDOMMediaStream)
 NS_INTERFACE_MAP_END_INHERITING(DOMMediaStream)
 
 NS_IMPL_ADDREF_INHERITED(nsDOMCameraControl, DOMMediaStream)
 NS_IMPL_RELEASE_INHERITED(nsDOMCameraControl, DOMMediaStream)
 
-NS_IMPL_CYCLE_COLLECTION_INHERITED_20(nsDOMCameraControl, DOMMediaStream,
-                                      mCapabilities,
-                                      mWindow,
-                                      mGetCameraOnSuccessCb,
-                                      mGetCameraOnErrorCb,
-                                      mAutoFocusOnSuccessCb,
-                                      mAutoFocusOnErrorCb,
-                                      mTakePictureOnSuccessCb,
-                                      mTakePictureOnErrorCb,
-                                      mStartRecordingOnSuccessCb,
-                                      mStartRecordingOnErrorCb,
-                                      mReleaseOnSuccessCb,
-                                      mReleaseOnErrorCb,
-                                      mSetConfigurationOnSuccessCb,
-                                      mSetConfigurationOnErrorCb,
-                                      mOnShutterCb,
-                                      mOnClosedCb,
-                                      mOnRecorderStateChangeCb,
-                                      mOnPreviewStateChangeCb,
-                                      mOnAutoFocusMovingCb,
-                                      mOnFacesDetectedCb)
+NS_IMPL_CYCLE_COLLECTION_INHERITED(nsDOMCameraControl, DOMMediaStream,
+                                   mCapabilities,
+                                   mWindow,
+                                   mGetCameraOnSuccessCb,
+                                   mGetCameraOnErrorCb,
+                                   mAutoFocusOnSuccessCb,
+                                   mAutoFocusOnErrorCb,
+                                   mTakePictureOnSuccessCb,
+                                   mTakePictureOnErrorCb,
+                                   mStartRecordingOnSuccessCb,
+                                   mStartRecordingOnErrorCb,
+                                   mReleaseOnSuccessCb,
+                                   mReleaseOnErrorCb,
+                                   mSetConfigurationOnSuccessCb,
+                                   mSetConfigurationOnErrorCb,
+                                   mOnShutterCb,
+                                   mOnClosedCb,
+                                   mOnRecorderStateChangeCb,
+                                   mOnPreviewStateChangeCb,
+                                   mOnAutoFocusMovingCb,
+                                   mOnFacesDetectedCb)
 
 /* static */
 bool
 nsDOMCameraControl::HasSupport(JSContext* aCx, JSObject* aGlobal)
 {
   return Navigator::HasCameraSupport(aCx, aGlobal);
 }
 
--- a/dom/camera/DOMCameraManager.cpp
+++ b/dom/camera/DOMCameraManager.cpp
@@ -169,17 +169,17 @@ protected:
   nsCOMPtr<nsPIDOMWindow> mWindow;
   nsRefPtr<nsDOMCameraManager> mCameraManager;
   uint32_t mCameraId;
   CameraConfiguration mInitialConfig;
   nsRefPtr<GetCameraCallback> mOnSuccess;
   nsRefPtr<CameraErrorCallback> mOnError;
 };
 
-NS_IMPL_CYCLE_COLLECTION_3(CameraPermissionRequest, mWindow, mOnSuccess, mOnError)
+NS_IMPL_CYCLE_COLLECTION(CameraPermissionRequest, mWindow, mOnSuccess, mOnError)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(CameraPermissionRequest)
   NS_INTERFACE_MAP_ENTRY(nsIContentPermissionRequest)
   NS_INTERFACE_MAP_ENTRY(nsIRunnable)
   NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIContentPermissionRequest)
 NS_INTERFACE_MAP_END
 
 NS_IMPL_CYCLE_COLLECTING_ADDREF(CameraPermissionRequest)
--- a/dom/datastore/DataStore.cpp
+++ b/dom/datastore/DataStore.cpp
@@ -17,17 +17,17 @@ namespace dom {
 
 NS_IMPL_ADDREF_INHERITED(DataStore, DOMEventTargetHelper)
 NS_IMPL_RELEASE_INHERITED(DataStore, DOMEventTargetHelper)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(DataStore)
   NS_INTERFACE_MAP_ENTRY(nsISupports)
 NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper)
 
-NS_IMPL_CYCLE_COLLECTION_1(DataStore, mStore)
+NS_IMPL_CYCLE_COLLECTION(DataStore, mStore)
 
 DataStore::DataStore(nsPIDOMWindow* aWindow)
   : DOMEventTargetHelper(aWindow)
 {
 }
 
 already_AddRefed<DataStore>
 DataStore::Constructor(GlobalObject& aGlobal, ErrorResult& aRv)
--- a/dom/datastore/DataStoreCursor.cpp
+++ b/dom/datastore/DataStoreCursor.cpp
@@ -11,17 +11,17 @@
 #include "nsPIDOMWindow.h"
 
 namespace mozilla {
 namespace dom {
 
 NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(DataStoreCursor, AddRef)
 NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(DataStoreCursor, Release)
 
-NS_IMPL_CYCLE_COLLECTION_1(DataStoreCursor, mCursor)
+NS_IMPL_CYCLE_COLLECTION(DataStoreCursor, mCursor)
 
 already_AddRefed<DataStoreCursor>
 DataStoreCursor::Constructor(GlobalObject& aGlobal, ErrorResult& aRv)
 {
   nsRefPtr<DataStoreCursor> cursor = new DataStoreCursor();
   return cursor.forget();
 }
 
--- a/dom/devicestorage/nsDeviceStorage.cpp
+++ b/dom/devicestorage/nsDeviceStorage.cpp
@@ -1759,18 +1759,18 @@ private:
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(DeviceStorageCursorRequest)
   NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIContentPermissionRequest)
   NS_INTERFACE_MAP_ENTRY(nsIContentPermissionRequest)
 NS_INTERFACE_MAP_END
 
 NS_IMPL_CYCLE_COLLECTING_ADDREF(DeviceStorageCursorRequest)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(DeviceStorageCursorRequest)
 
-NS_IMPL_CYCLE_COLLECTION_1(DeviceStorageCursorRequest,
-                           mCursor)
+NS_IMPL_CYCLE_COLLECTION(DeviceStorageCursorRequest,
+                         mCursor)
 
 
 class PostErrorEvent : public nsRunnable
 {
 public:
   PostErrorEvent(already_AddRefed<DOMRequest> aRequest, const char* aMessage)
     : mRequest(aRequest)
   {
@@ -3078,21 +3078,21 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(
   NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIContentPermissionRequest)
   NS_INTERFACE_MAP_ENTRY(nsIContentPermissionRequest)
   NS_INTERFACE_MAP_ENTRY(nsIRunnable)
 NS_INTERFACE_MAP_END
 
 NS_IMPL_CYCLE_COLLECTING_ADDREF(DeviceStorageRequest)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(DeviceStorageRequest)
 
-NS_IMPL_CYCLE_COLLECTION_4(DeviceStorageRequest,
-                           mRequest,
-                           mWindow,
-                           mBlob,
-                           mDeviceStorage)
+NS_IMPL_CYCLE_COLLECTION(DeviceStorageRequest,
+                         mRequest,
+                         mWindow,
+                         mBlob,
+                         mDeviceStorage)
 
 
 NS_INTERFACE_MAP_BEGIN(nsDOMDeviceStorage)
   NS_INTERFACE_MAP_ENTRY(nsIDOMDeviceStorage)
   NS_INTERFACE_MAP_ENTRY(nsIObserver)
 NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper)
 
 NS_IMPL_ADDREF_INHERITED(nsDOMDeviceStorage, DOMEventTargetHelper)
--- a/dom/events/DeviceMotionEvent.cpp
+++ b/dom/events/DeviceMotionEvent.cpp
@@ -9,20 +9,20 @@
 
 namespace mozilla {
 namespace dom {
 
 /******************************************************************************
  * DeviceMotionEvent
  *****************************************************************************/
 
-NS_IMPL_CYCLE_COLLECTION_INHERITED_3(DeviceMotionEvent, Event,
-                                     mAcceleration,
-                                     mAccelerationIncludingGravity,
-                                     mRotationRate)
+NS_IMPL_CYCLE_COLLECTION_INHERITED(DeviceMotionEvent, Event,
+                                   mAcceleration,
+                                   mAccelerationIncludingGravity,
+                                   mRotationRate)
 
 NS_IMPL_ADDREF_INHERITED(DeviceMotionEvent, Event)
 NS_IMPL_RELEASE_INHERITED(DeviceMotionEvent, Event)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(DeviceMotionEvent)
 NS_INTERFACE_MAP_END_INHERITING(Event)
 
 void
--- a/dom/events/EventListenerService.cpp
+++ b/dom/events/EventListenerService.cpp
@@ -23,17 +23,17 @@
 namespace mozilla {
 
 using namespace dom;
 
 /******************************************************************************
  * mozilla::EventListenerInfo
  ******************************************************************************/
 
-NS_IMPL_CYCLE_COLLECTION_1(EventListenerInfo, mListener)
+NS_IMPL_CYCLE_COLLECTION(EventListenerInfo, mListener)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(EventListenerInfo)
   NS_INTERFACE_MAP_ENTRY(nsIEventListenerInfo)
   NS_INTERFACE_MAP_ENTRY(nsISupports)
 NS_INTERFACE_MAP_END
 
 NS_IMPL_CYCLE_COLLECTING_ADDREF(EventListenerInfo)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(EventListenerInfo)
--- a/dom/events/EventStateManager.cpp
+++ b/dom/events/EventStateManager.cpp
@@ -237,20 +237,20 @@ OverOutElementsWrapper::OverOutElementsW
   : mLastOverFrame(nullptr)
 {
 }
 
 OverOutElementsWrapper::~OverOutElementsWrapper()
 {
 }
 
-NS_IMPL_CYCLE_COLLECTION_3(OverOutElementsWrapper,
-                           mLastOverElement,
-                           mFirstOverEventElement,
-                           mFirstOutEventElement)
+NS_IMPL_CYCLE_COLLECTION(OverOutElementsWrapper,
+                         mLastOverElement,
+                         mFirstOverEventElement,
+                         mFirstOutEventElement)
 NS_IMPL_CYCLE_COLLECTING_ADDREF(OverOutElementsWrapper)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(OverOutElementsWrapper)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(OverOutElementsWrapper)
   NS_INTERFACE_MAP_ENTRY(nsISupports)
 NS_INTERFACE_MAP_END
 
 /******************************************************************/
@@ -408,34 +408,34 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(
    NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIObserver)
    NS_INTERFACE_MAP_ENTRY(nsIObserver)
    NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference)
 NS_INTERFACE_MAP_END
 
 NS_IMPL_CYCLE_COLLECTING_ADDREF(EventStateManager)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(EventStateManager)
 
-NS_IMPL_CYCLE_COLLECTION_17(EventStateManager,
-                            mCurrentTargetContent,
-                            mGestureDownContent,
-                            mGestureDownFrameOwner,
-                            mLastLeftMouseDownContent,
-                            mLastLeftMouseDownContentParent,
-                            mLastMiddleMouseDownContent,
-                            mLastMiddleMouseDownContentParent,
-                            mLastRightMouseDownContent,
-                            mLastRightMouseDownContentParent,
-                            mActiveContent,
-                            mHoverContent,
-                            mURLTargetContent,
-                            mMouseEnterLeaveHelper,
-                            mPointersEnterLeaveHelper,
-                            mDocument,
-                            mIMEContentObserver,
-                            mAccessKeys)
+NS_IMPL_CYCLE_COLLECTION(EventStateManager,
+                         mCurrentTargetContent,
+                         mGestureDownContent,
+                         mGestureDownFrameOwner,
+                         mLastLeftMouseDownContent,
+                         mLastLeftMouseDownContentParent,
+                         mLastMiddleMouseDownContent,
+                         mLastMiddleMouseDownContentParent,
+                         mLastRightMouseDownContent,
+                         mLastRightMouseDownContentParent,
+                         mActiveContent,
+                         mHoverContent,
+                         mURLTargetContent,
+                         mMouseEnterLeaveHelper,
+                         mPointersEnterLeaveHelper,
+                         mDocument,
+                         mIMEContentObserver,
+                         mAccessKeys)
 
 void
 EventStateManager::ReleaseCurrentIMEContentObserver()
 {
   if (mIMEContentObserver) {
     mIMEContentObserver->DisconnectFromEventStateManager();
   }
   mIMEContentObserver = nullptr;
--- a/dom/events/IMEContentObserver.cpp
+++ b/dom/events/IMEContentObserver.cpp
@@ -29,19 +29,19 @@
 #include "nsPresContext.h"
 #include "nsThreadUtils.h"
 #include "nsWeakReference.h"
 
 namespace mozilla {
 
 using namespace widget;
 
-NS_IMPL_CYCLE_COLLECTION_5(IMEContentObserver,
-                           mWidget, mSelection,
-                           mRootContent, mEditableNode, mDocShell)
+NS_IMPL_CYCLE_COLLECTION(IMEContentObserver,
+                         mWidget, mSelection,
+                         mRootContent, mEditableNode, mDocShell)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(IMEContentObserver)
  NS_INTERFACE_MAP_ENTRY(nsISelectionListener)
  NS_INTERFACE_MAP_ENTRY(nsIMutationObserver)
  NS_INTERFACE_MAP_ENTRY(nsIReflowObserver)
  NS_INTERFACE_MAP_ENTRY(nsIScrollObserver)
  NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference)
  NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsISelectionListener)
--- a/dom/events/TouchEvent.cpp
+++ b/dom/events/TouchEvent.cpp
@@ -78,20 +78,20 @@ TouchEvent::TouchEvent(EventTarget* aOwn
       touch->InitializePoints(mPresContext, aEvent);
     }
   } else {
     mEventIsInternal = true;
     mEvent->time = PR_Now();
   }
 }
 
-NS_IMPL_CYCLE_COLLECTION_INHERITED_3(TouchEvent, UIEvent,
-                                     mTouches,
-                                     mTargetTouches,
-                                     mChangedTouches)
+NS_IMPL_CYCLE_COLLECTION_INHERITED(TouchEvent, UIEvent,
+                                   mTouches,
+                                   mTargetTouches,
+                                   mChangedTouches)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(TouchEvent)
 NS_INTERFACE_MAP_END_INHERITING(UIEvent)
 
 NS_IMPL_ADDREF_INHERITED(TouchEvent, UIEvent)
 NS_IMPL_RELEASE_INHERITED(TouchEvent, UIEvent)
 
 void
--- a/dom/events/UIEvent.cpp
+++ b/dom/events/UIEvent.cpp
@@ -89,18 +89,18 @@ UIEvent::Constructor(const GlobalObject&
   nsRefPtr<UIEvent> e = new UIEvent(t, nullptr, nullptr);
   bool trusted = e->Init(t);
   aRv = e->InitUIEvent(aType, aParam.mBubbles, aParam.mCancelable, aParam.mView,
                        aParam.mDetail);
   e->SetTrusted(trusted);
   return e.forget();
 }
 
-NS_IMPL_CYCLE_COLLECTION_INHERITED_1(UIEvent, Event,
-                                     mView)
+NS_IMPL_CYCLE_COLLECTION_INHERITED(UIEvent, Event,
+                                   mView)
 
 NS_IMPL_ADDREF_INHERITED(UIEvent, Event)
 NS_IMPL_RELEASE_INHERITED(UIEvent, Event)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(UIEvent)
   NS_INTERFACE_MAP_ENTRY(nsIDOMUIEvent)
 NS_INTERFACE_MAP_END_INHERITING(Event)
 
--- a/dom/events/XULCommandEvent.cpp
+++ b/dom/events/XULCommandEvent.cpp
@@ -23,18 +23,18 @@ XULCommandEvent::XULCommandEvent(EventTa
     mEventIsInternal = true;
     mEvent->time = PR_Now();
   }
 }
 
 NS_IMPL_ADDREF_INHERITED(XULCommandEvent, UIEvent)
 NS_IMPL_RELEASE_INHERITED(XULCommandEvent, UIEvent)
 
-NS_IMPL_CYCLE_COLLECTION_INHERITED_1(XULCommandEvent, UIEvent,
-                                     mSourceEvent)
+NS_IMPL_CYCLE_COLLECTION_INHERITED(XULCommandEvent, UIEvent,
+                                   mSourceEvent)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(XULCommandEvent)
   NS_INTERFACE_MAP_ENTRY(nsIDOMXULCommandEvent)
 NS_INTERFACE_MAP_END_INHERITING(UIEvent)
 
 bool
 XULCommandEvent::AltKey()
 {
--- a/dom/file/ArchiveRequest.cpp
+++ b/dom/file/ArchiveRequest.cpp
@@ -264,16 +264,16 @@ ArchiveRequest::Create(nsPIDOMWindow* aO
 {
   NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
 
   nsRefPtr<ArchiveRequest> request = new ArchiveRequest(aOwner, aReader);
 
   return request.forget();
 }
 
-NS_IMPL_CYCLE_COLLECTION_INHERITED_1(ArchiveRequest, DOMRequest,
-                                     mArchiveReader)
+NS_IMPL_CYCLE_COLLECTION_INHERITED(ArchiveRequest, DOMRequest,
+                                   mArchiveReader)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(ArchiveRequest)
 NS_INTERFACE_MAP_END_INHERITING(DOMRequest)
 
 NS_IMPL_ADDREF_INHERITED(ArchiveRequest, DOMRequest)
 NS_IMPL_RELEASE_INHERITED(ArchiveRequest, DOMRequest)
--- a/dom/file/ArchiveZipFile.cpp
+++ b/dom/file/ArchiveZipFile.cpp
@@ -391,18 +391,18 @@ ArchiveZipFile::CreateSlice(uint64_t aSt
                                               mContentType,
                                               aStart,
                                               mLength,
                                               mCentral,
                                               mArchiveReader);
   return t.forget();
 }
 
-NS_IMPL_CYCLE_COLLECTION_1(ArchiveZipFile,
-                           mArchiveReader)
+NS_IMPL_CYCLE_COLLECTION(ArchiveZipFile,
+                         mArchiveReader)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(ArchiveZipFile)
   NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIDOMFile)
   NS_INTERFACE_MAP_ENTRY(nsIDOMBlob)
   NS_INTERFACE_MAP_ENTRY_CONDITIONAL(nsIDOMFile, mIsFile)
   NS_INTERFACE_MAP_ENTRY(nsIXHRSendable)
   NS_INTERFACE_MAP_ENTRY(nsIMutable)
 NS_INTERFACE_MAP_END_INHERITING(nsDOMFileCC)
--- a/dom/file/File.cpp
+++ b/dom/file/File.cpp
@@ -31,18 +31,18 @@ File::File(const File* aOther, uint64_t 
       MutexAutoLock lock(IndexedDatabaseManager::FileMutex());
       fileInfo = aOther->GetFileInfo();
     }
 
     mFileInfos.AppendElement(fileInfo);
   }
 }
 
-NS_IMPL_CYCLE_COLLECTION_INHERITED_1(File, nsDOMFileCC,
-                                     mLockedFile)
+NS_IMPL_CYCLE_COLLECTION_INHERITED(File, nsDOMFileCC,
+                                   mLockedFile)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(File)
 NS_INTERFACE_MAP_END_INHERITING(nsDOMFileCC)
 
 NS_IMPL_ADDREF_INHERITED(File, nsDOMFileCC)
 NS_IMPL_RELEASE_INHERITED(File, nsDOMFileCC)
 
 NS_IMETHODIMP
--- a/dom/file/FileHandle.cpp
+++ b/dom/file/FileHandle.cpp
@@ -50,18 +50,18 @@ public:
   }
 
 private:
   nsRefPtr<FileHandle> mFileHandle;
 };
 
 } // anonymous namespace
 
-NS_IMPL_CYCLE_COLLECTION_INHERITED_1(FileHandle, DOMEventTargetHelper,
-                                     mFileStorage)
+NS_IMPL_CYCLE_COLLECTION_INHERITED(FileHandle, DOMEventTargetHelper,
+                                   mFileStorage)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(FileHandle)
 NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper)
 
 NS_IMPL_ADDREF_INHERITED(FileHandle, DOMEventTargetHelper)
 NS_IMPL_RELEASE_INHERITED(FileHandle, DOMEventTargetHelper)
 
 // static
--- a/dom/file/FileRequest.cpp
+++ b/dom/file/FileRequest.cpp
@@ -91,18 +91,18 @@ FileRequest::NotifyHelperCompleted(FileH
   }
   else {
     FireError(rv);
   }
 
   return NS_OK;
 }
 
-NS_IMPL_CYCLE_COLLECTION_INHERITED_1(FileRequest, DOMRequest,
-                                     mLockedFile)
+NS_IMPL_CYCLE_COLLECTION_INHERITED(FileRequest, DOMRequest,
+                                   mLockedFile)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(FileRequest)
 NS_INTERFACE_MAP_END_INHERITING(DOMRequest)
 
 NS_IMPL_ADDREF_INHERITED(FileRequest, DOMRequest)
 NS_IMPL_RELEASE_INHERITED(FileRequest, DOMRequest)
 
 // virtual
--- a/dom/file/LockedFile.cpp
+++ b/dom/file/LockedFile.cpp
@@ -257,18 +257,18 @@ LockedFile::LockedFile()
   SetIsDOMBinding();
 }
 
 LockedFile::~LockedFile()
 {
   NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
 }
 
-NS_IMPL_CYCLE_COLLECTION_INHERITED_1(LockedFile, DOMEventTargetHelper,
-                                     mFileHandle)
+NS_IMPL_CYCLE_COLLECTION_INHERITED(LockedFile, DOMEventTargetHelper,
+                                   mFileHandle)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(LockedFile)
   NS_INTERFACE_MAP_ENTRY(nsIRunnable)
 NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper)
 
 NS_IMPL_ADDREF_INHERITED(LockedFile, DOMEventTargetHelper)
 NS_IMPL_RELEASE_INHERITED(LockedFile, DOMEventTargetHelper)
 
--- a/dom/ipc/TabChild.cpp
+++ b/dom/ipc/TabChild.cpp
@@ -118,17 +118,17 @@ TabChildBase::TabChildBase()
 {
 }
 
 NS_IMPL_CYCLE_COLLECTING_ADDREF(TabChildBase)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(TabChildBase)
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(TabChildBase)
 NS_INTERFACE_MAP_END
 
-NS_IMPL_CYCLE_COLLECTION_2(TabChildBase, mTabChildGlobal, mGlobal)
+NS_IMPL_CYCLE_COLLECTION(TabChildBase, mTabChildGlobal, mGlobal)
 
 void
 TabChildBase::InitializeRootMetrics()
 {
   // Calculate a really simple resolution that we probably won't
   // be keeping, as well as putting the scroll offset back to
   // the top-left of the page.
   mLastRootMetrics.mViewport = CSSRect(CSSPoint(), kDefaultViewportSize);
@@ -2713,18 +2713,18 @@ void
 TabChildGlobal::Init()
 {
   NS_ASSERTION(!mMessageManager, "Re-initializing?!?");
   mMessageManager = new nsFrameMessageManager(mTabChild,
                                               nullptr,
                                               MM_CHILD);
 }
 
-NS_IMPL_CYCLE_COLLECTION_INHERITED_2(TabChildGlobal, DOMEventTargetHelper,
-                                     mMessageManager, mTabChild)
+NS_IMPL_CYCLE_COLLECTION_INHERITED(TabChildGlobal, DOMEventTargetHelper,
+                                   mMessageManager, mTabChild)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(TabChildGlobal)
   NS_INTERFACE_MAP_ENTRY(nsIMessageListenerManager)
   NS_INTERFACE_MAP_ENTRY(nsIMessageSender)
   NS_INTERFACE_MAP_ENTRY(nsISyncMessageSender)
   NS_INTERFACE_MAP_ENTRY(nsIContentFrameMessageManager)
   NS_INTERFACE_MAP_ENTRY(nsIScriptObjectPrincipal)
   NS_INTERFACE_MAP_ENTRY(nsIGlobalObject)
--- a/dom/mobilemessage/src/MobileMessageCursorCallback.cpp
+++ b/dom/mobilemessage/src/MobileMessageCursorCallback.cpp
@@ -10,17 +10,17 @@
 #include "DOMCursor.h"
 #include "nsCxPusher.h"
 #include "nsServiceManagerUtils.h"      // for do_GetService
 
 namespace mozilla {
 namespace dom {
 namespace mobilemessage {
 
-NS_IMPL_CYCLE_COLLECTION_1(MobileMessageCursorCallback, mDOMCursor)
+NS_IMPL_CYCLE_COLLECTION(MobileMessageCursorCallback, mDOMCursor)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(MobileMessageCursorCallback)
   NS_INTERFACE_MAP_ENTRY(nsIMobileMessageCursorCallback)
   NS_INTERFACE_MAP_ENTRY(nsISupports)
 NS_INTERFACE_MAP_END
 
 NS_IMPL_CYCLE_COLLECTING_ADDREF(MobileMessageCursorCallback)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(MobileMessageCursorCallback)
--- a/dom/network/src/TCPServerSocketChild.cpp
+++ b/dom/network/src/TCPServerSocketChild.cpp
@@ -11,17 +11,17 @@
 #include "nsJSUtils.h"
 #include "jsfriendapi.h"
 
 using mozilla::net::gNeckoChild;
 
 namespace mozilla {
 namespace dom {
 
-NS_IMPL_CYCLE_COLLECTION_1(TCPServerSocketChildBase, mServerSocket)
+NS_IMPL_CYCLE_COLLECTION(TCPServerSocketChildBase, mServerSocket)
 NS_IMPL_CYCLE_COLLECTING_ADDREF(TCPServerSocketChildBase)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(TCPServerSocketChildBase)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(TCPServerSocketChildBase)
   NS_INTERFACE_MAP_ENTRY(nsITCPServerSocketChild)
   NS_INTERFACE_MAP_ENTRY(nsISupports)
 NS_INTERFACE_MAP_END
 
--- a/dom/network/src/TCPServerSocketParent.cpp
+++ b/dom/network/src/TCPServerSocketParent.cpp
@@ -15,17 +15,17 @@ static void
 FireInteralError(mozilla::net::PTCPServerSocketParent* aActor,
                  uint32_t aLineNo)
 {
   mozilla::unused <<
       aActor->SendCallbackError(NS_LITERAL_STRING("Internal error"),
                           NS_LITERAL_STRING(__FILE__), aLineNo, 0);
 }
 
-NS_IMPL_CYCLE_COLLECTION_2(TCPServerSocketParent, mServerSocket, mIntermediary)
+NS_IMPL_CYCLE_COLLECTION(TCPServerSocketParent, mServerSocket, mIntermediary)
 NS_IMPL_CYCLE_COLLECTING_ADDREF(TCPServerSocketParent)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(TCPServerSocketParent)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(TCPServerSocketParent)
   NS_INTERFACE_MAP_ENTRY(nsITCPServerSocketParent)
   NS_INTERFACE_MAP_ENTRY(nsISupports)
 NS_INTERFACE_MAP_END
 
--- a/dom/network/src/TCPSocketChild.cpp
+++ b/dom/network/src/TCPSocketChild.cpp
@@ -38,17 +38,17 @@ DeserializeArrayBuffer(JS::Handle<JSObje
   return true;
 }
 
 } // namespace IPC
 
 namespace mozilla {
 namespace dom {
 
-NS_IMPL_CYCLE_COLLECTION_1(TCPSocketChildBase, mSocket)
+NS_IMPL_CYCLE_COLLECTION(TCPSocketChildBase, mSocket)
 NS_IMPL_CYCLE_COLLECTING_ADDREF(TCPSocketChildBase)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(TCPSocketChildBase)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(TCPSocketChildBase)
   NS_INTERFACE_MAP_ENTRY(nsITCPSocketChild)
   NS_INTERFACE_MAP_ENTRY(nsISupports)
 NS_INTERFACE_MAP_END
 
--- a/dom/network/src/TCPSocketParent.cpp
+++ b/dom/network/src/TCPSocketParent.cpp
@@ -33,17 +33,17 @@ static void
 FireInteralError(mozilla::net::PTCPSocketParent* aActor, uint32_t aLineNo)
 {
   mozilla::unused <<
       aActor->SendCallback(NS_LITERAL_STRING("onerror"),
                            TCPError(NS_LITERAL_STRING("InvalidStateError")),
                            NS_LITERAL_STRING("connecting"));
 }
 
-NS_IMPL_CYCLE_COLLECTION_2(TCPSocketParentBase, mSocket, mIntermediary)
+NS_IMPL_CYCLE_COLLECTION(TCPSocketParentBase, mSocket, mIntermediary)
 NS_IMPL_CYCLE_COLLECTING_ADDREF(TCPSocketParentBase)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(TCPSocketParentBase)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(TCPSocketParentBase)
   NS_INTERFACE_MAP_ENTRY(nsITCPSocketParent)
   NS_INTERFACE_MAP_ENTRY(nsISupports)
 NS_INTERFACE_MAP_END
 
--- a/dom/promise/Promise.cpp
+++ b/dom/promise/Promise.cpp
@@ -712,17 +712,17 @@ private:
 };
 
 NS_IMPL_CYCLE_COLLECTING_ADDREF(AllResolveHandler)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(AllResolveHandler)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(AllResolveHandler)
 NS_INTERFACE_MAP_END_INHERITING(PromiseNativeHandler)
 
-NS_IMPL_CYCLE_COLLECTION_1(AllResolveHandler, mCountdownHolder)
+NS_IMPL_CYCLE_COLLECTION(AllResolveHandler, mCountdownHolder)
 
 /* static */ already_AddRefed<Promise>
 Promise::All(const GlobalObject& aGlobal, JSContext* aCx,
              const Sequence<JS::Value>& aIterable, ErrorResult& aRv)
 {
   nsCOMPtr<nsIGlobalObject> global =
     do_QueryInterface(aGlobal.GetAsSupports());
   if (!global) {
--- a/dom/promise/PromiseCallback.cpp
+++ b/dom/promise/PromiseCallback.cpp
@@ -306,18 +306,18 @@ WrapperPromiseCallback::Call(JS::Handle<
     return;
   }
 
   mNextPromise->ResolveInternal(cx, retValue, Promise::SyncTask);
 }
 
 // NativePromiseCallback
 
-NS_IMPL_CYCLE_COLLECTION_INHERITED_1(NativePromiseCallback,
-                                     PromiseCallback, mHandler)
+NS_IMPL_CYCLE_COLLECTION_INHERITED(NativePromiseCallback,
+                                   PromiseCallback, mHandler)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(NativePromiseCallback)
 NS_INTERFACE_MAP_END_INHERITING(PromiseCallback)
 
 NS_IMPL_ADDREF_INHERITED(NativePromiseCallback, PromiseCallback)
 NS_IMPL_RELEASE_INHERITED(NativePromiseCallback, PromiseCallback)
 
 NativePromiseCallback::NativePromiseCallback(PromiseNativeHandler* aHandler,
--- a/dom/smil/TimeEvent.cpp
+++ b/dom/smil/TimeEvent.cpp
@@ -39,18 +39,18 @@ TimeEvent::TimeEvent(EventTarget* aOwner
       nsCOMPtr<nsIDOMWindow> window = do_GetInterface(container);
       if (window) {
         mView = do_QueryInterface(window);
       }
     }
   }
 }
 
-NS_IMPL_CYCLE_COLLECTION_INHERITED_1(TimeEvent, Event,
-                                     mView)
+NS_IMPL_CYCLE_COLLECTION_INHERITED(TimeEvent, Event,
+                                   mView)
 
 NS_IMPL_ADDREF_INHERITED(TimeEvent, Event)
 NS_IMPL_RELEASE_INHERITED(TimeEvent, Event)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(TimeEvent)
   NS_INTERFACE_MAP_ENTRY(nsIDOMTimeEvent)
 NS_INTERFACE_MAP_END_INHERITING(Event)
 
--- a/dom/src/geolocation/nsGeolocation.cpp
+++ b/dom/src/geolocation/nsGeolocation.cpp
@@ -341,17 +341,17 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(
   NS_INTERFACE_MAP_ENTRY(nsIContentPermissionRequest)
   NS_INTERFACE_MAP_ENTRY(nsITimerCallback)
   NS_INTERFACE_MAP_ENTRY(nsIGeolocationUpdate)
 NS_INTERFACE_MAP_END
 
 NS_IMPL_CYCLE_COLLECTING_ADDREF(nsGeolocationRequest)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(nsGeolocationRequest)
 
-NS_IMPL_CYCLE_COLLECTION_3(nsGeolocationRequest, mCallback, mErrorCallback, mLocator)
+NS_IMPL_CYCLE_COLLECTION(nsGeolocationRequest, mCallback, mErrorCallback, mLocator)
 
 NS_IMETHODIMP
 nsGeolocationRequest::Notify(nsITimer* aTimer)
 {
   StopTimeoutTimer();
   NotifyErrorAndShutdown(nsIDOMGeoPositionError::TIMEOUT);
   return NS_OK;
 }
--- a/dom/src/notification/Notification.cpp
+++ b/dom/src/notification/Notification.cpp
@@ -207,17 +207,17 @@ public:
 
 protected:
   nsRefPtr<Notification> mNotification;
   NotificationAction mAction;
 };
 
 uint32_t Notification::sCount = 0;
 
-NS_IMPL_CYCLE_COLLECTION_1(NotificationPermissionRequest, mWindow)
+NS_IMPL_CYCLE_COLLECTION(NotificationPermissionRequest, mWindow)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(NotificationPermissionRequest)
   NS_INTERFACE_MAP_ENTRY(nsIContentPermissionRequest)
   NS_INTERFACE_MAP_ENTRY(nsIRunnable)
   NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIContentPermissionRequest)
 NS_INTERFACE_MAP_END
 
 NS_IMPL_CYCLE_COLLECTING_ADDREF(NotificationPermissionRequest)
--- a/dom/src/offline/nsDOMOfflineResourceList.cpp
+++ b/dom/src/offline/nsDOMOfflineResourceList.cpp
@@ -48,20 +48,20 @@ using namespace mozilla::dom;
 static const char kMaxEntriesPref[] =  "offline.max_site_resources";
 #define DEFAULT_MAX_ENTRIES 100
 #define MAX_URI_LENGTH 2048
 
 //
 // nsDOMOfflineResourceList
 //
 
-NS_IMPL_CYCLE_COLLECTION_INHERITED_2(nsDOMOfflineResourceList,
-                                     DOMEventTargetHelper,
-                                     mCacheUpdate,
-                                     mPendingEvents)
+NS_IMPL_CYCLE_COLLECTION_INHERITED(nsDOMOfflineResourceList,
+                                   DOMEventTargetHelper,
+                                   mCacheUpdate,
+                                   mPendingEvents)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(nsDOMOfflineResourceList)
   NS_INTERFACE_MAP_ENTRY(nsIDOMOfflineResourceList)
   NS_INTERFACE_MAP_ENTRY(nsIOfflineCacheUpdateObserver)
   NS_INTERFACE_MAP_ENTRY(nsIObserver)
   NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference)
 NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper)
 
--- a/dom/telephony/TelephonyCall.cpp
+++ b/dom/telephony/TelephonyCall.cpp
@@ -175,21 +175,21 @@ TelephonyCall::ChangeGroup(TelephonyCall
   mGroup = aGroup;
 
   nsresult rv = DispatchCallEvent(NS_LITERAL_STRING("groupchange"), this);
   if (NS_FAILED(rv)) {
     NS_WARNING("Failed to dispatch error event!");
   }
 }
 
-NS_IMPL_CYCLE_COLLECTION_INHERITED_3(TelephonyCall,
-                                     DOMEventTargetHelper,
-                                     mTelephony,
-                                     mError,
-                                     mGroup);
+NS_IMPL_CYCLE_COLLECTION_INHERITED(TelephonyCall,
+                                   DOMEventTargetHelper,
+                                   mTelephony,
+                                   mError,
+                                   mGroup);
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(TelephonyCall)
 NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper)
 
 NS_IMPL_ADDREF_INHERITED(TelephonyCall, DOMEventTargetHelper)
 NS_IMPL_RELEASE_INHERITED(TelephonyCall, DOMEventTargetHelper)
 
 // TelephonyCall WebIDL
--- a/dom/workers/URL.cpp
+++ b/dom/workers/URL.cpp
@@ -501,17 +501,17 @@ public:
 
 private:
   const nsString mValue;
   SetterType mType;
   nsRefPtr<URLProxy> mURLProxy;
   mozilla::ErrorResult& mRv;
 };
 
-NS_IMPL_CYCLE_COLLECTION_1(URL, mSearchParams)
+NS_IMPL_CYCLE_COLLECTION(URL, mSearchParams)
 
 // The reason for using worker::URL is to have different refcnt logging than
 // for main thread URL.
 NS_IMPL_CYCLE_COLLECTING_ADDREF(workers::URL)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(workers::URL)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(URL)
   NS_INTERFACE_MAP_ENTRY(nsISupports)
--- a/dom/workers/XMLHttpRequestUpload.cpp
+++ b/dom/workers/XMLHttpRequestUpload.cpp
@@ -22,18 +22,18 @@ XMLHttpRequestUpload::~XMLHttpRequestUpl
 }
 
 NS_IMPL_ADDREF_INHERITED(XMLHttpRequestUpload, nsXHREventTarget)
 NS_IMPL_RELEASE_INHERITED(XMLHttpRequestUpload, nsXHREventTarget)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(XMLHttpRequestUpload)
 NS_INTERFACE_MAP_END_INHERITING(nsXHREventTarget)
 
-NS_IMPL_CYCLE_COLLECTION_INHERITED_1(XMLHttpRequestUpload, nsXHREventTarget,
-                                     mXHR)
+NS_IMPL_CYCLE_COLLECTION_INHERITED(XMLHttpRequestUpload, nsXHREventTarget,
+                                   mXHR)
 
 JSObject*
 XMLHttpRequestUpload::WrapObject(JSContext* aCx)
 {
   return XMLHttpRequestUploadBinding_workers::Wrap(aCx, this);
 }
 
 // static
--- a/dom/xbl/nsXBLResourceLoader.cpp
+++ b/dom/xbl/nsXBLResourceLoader.cpp
@@ -24,17 +24,17 @@
 #include "nsFrameManager.h"
 #include "nsStyleContext.h"
 #include "nsXBLPrototypeBinding.h"
 #include "nsCSSRuleProcessor.h"
 #include "nsContentUtils.h"
 #include "nsStyleSet.h"
 #include "nsIScriptSecurityManager.h"
 
-NS_IMPL_CYCLE_COLLECTION_1(nsXBLResourceLoader, mBoundElements)
+NS_IMPL_CYCLE_COLLECTION(nsXBLResourceLoader, mBoundElements)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsXBLResourceLoader)
   NS_INTERFACE_MAP_ENTRY(nsICSSLoaderObserver)
   NS_INTERFACE_MAP_ENTRY(nsISupports)
 NS_INTERFACE_MAP_END
 
 NS_IMPL_CYCLE_COLLECTING_ADDREF(nsXBLResourceLoader)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(nsXBLResourceLoader)
--- a/dom/xslt/xpath/nsXPathExpression.cpp
+++ b/dom/xslt/xpath/nsXPathExpression.cpp
@@ -9,17 +9,17 @@
 #include "nsError.h"
 #include "nsIDOMCharacterData.h"
 #include "nsDOMClassInfoID.h"
 #include "nsIDOMDocument.h"
 #include "nsXPathResult.h"
 #include "txURIUtils.h"
 #include "txXPathTreeWalker.h"
 
-NS_IMPL_CYCLE_COLLECTION_1(nsXPathExpression, mDocument)
+NS_IMPL_CYCLE_COLLECTION(nsXPathExpression, mDocument)
 
 NS_IMPL_CYCLE_COLLECTING_ADDREF(nsXPathExpression)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(nsXPathExpression)
 
 DOMCI_DATA(XPathExpression, nsXPathExpression)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsXPathExpression)
   NS_INTERFACE_MAP_ENTRY(nsIDOMXPathExpression)
--- a/dom/xslt/xpath/nsXPathNSResolver.cpp
+++ b/dom/xslt/xpath/nsXPathNSResolver.cpp
@@ -2,17 +2,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsXPathNSResolver.h"
 #include "nsDOMClassInfoID.h"
 #include "nsDOMString.h"
 
-NS_IMPL_CYCLE_COLLECTION_1(nsXPathNSResolver, mNode)
+NS_IMPL_CYCLE_COLLECTION(nsXPathNSResolver, mNode)
 
 NS_IMPL_CYCLE_COLLECTING_ADDREF(nsXPathNSResolver)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(nsXPathNSResolver)
 
 DOMCI_DATA(XPathNSResolver, nsXPathNSResolver)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsXPathNSResolver)
   NS_INTERFACE_MAP_ENTRY(nsIDOMXPathNSResolver)
--- a/editor/composer/src/nsEditorSpellCheck.cpp
+++ b/editor/composer/src/nsEditorSpellCheck.cpp
@@ -239,20 +239,20 @@ NS_IMPL_CYCLE_COLLECTING_ADDREF(nsEditor
 NS_IMPL_CYCLE_COLLECTING_RELEASE(nsEditorSpellCheck)
 
 NS_INTERFACE_MAP_BEGIN(nsEditorSpellCheck)
   NS_INTERFACE_MAP_ENTRY(nsIEditorSpellCheck)
   NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIEditorSpellCheck)
   NS_INTERFACE_MAP_ENTRIES_CYCLE_COLLECTION(nsEditorSpellCheck)
 NS_INTERFACE_MAP_END
 
-NS_IMPL_CYCLE_COLLECTION_3(nsEditorSpellCheck,
-                           mEditor,
-                           mSpellChecker,
-                           mTxtSrvFilter)
+NS_IMPL_CYCLE_COLLECTION(nsEditorSpellCheck,
+                         mEditor,
+                         mSpellChecker,
+                         mTxtSrvFilter)
 
 nsEditorSpellCheck::nsEditorSpellCheck()
   : mSuggestedWordIndex(0)
   , mDictionaryIndex(0)
   , mEditor(nullptr)
   , mDictionaryFetcherGroup(0)
   , mUpdateDictionaryRunning(false)
 {
--- a/editor/libeditor/base/ChangeAttributeTxn.cpp
+++ b/editor/libeditor/base/ChangeAttributeTxn.cpp
@@ -13,18 +13,18 @@
 
 using namespace mozilla;
 
 ChangeAttributeTxn::ChangeAttributeTxn()
   : EditTxn()
 {
 }
 
-NS_IMPL_CYCLE_COLLECTION_INHERITED_1(ChangeAttributeTxn, EditTxn,
-                                     mElement)
+NS_IMPL_CYCLE_COLLECTION_INHERITED(ChangeAttributeTxn, EditTxn,
+                                   mElement)
 
 NS_IMPL_ADDREF_INHERITED(ChangeAttributeTxn, EditTxn)
 NS_IMPL_RELEASE_INHERITED(ChangeAttributeTxn, EditTxn)
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(ChangeAttributeTxn)
 NS_INTERFACE_MAP_END_INHERITING(EditTxn)
 
 NS_IMETHODIMP ChangeAttributeTxn::Init(nsEditor      *aEditor,
                                        dom::Element *aElement,
--- a/editor/libeditor/base/ChangeCSSInlineStyleTxn.cpp
+++ b/editor/libeditor/base/ChangeCSSInlineStyleTxn.cpp
@@ -20,18 +20,18 @@
 #include "nsString.h"                   // for nsAutoString, nsString, etc
 #include "nsUnicharUtils.h"
 #include "nsXPCOM.h"                    // for NS_Free
 
 class nsIEditor;
 
 #define kNullCh (char16_t('\0'))
 
-NS_IMPL_CYCLE_COLLECTION_INHERITED_1(ChangeCSSInlineStyleTxn, EditTxn,
-                                     mElement)
+NS_IMPL_CYCLE_COLLECTION_INHERITED(ChangeCSSInlineStyleTxn, EditTxn,
+                                   mElement)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(ChangeCSSInlineStyleTxn)
 NS_INTERFACE_MAP_END_INHERITING(EditTxn)
 
 // answers true if aValue is in the string list of white-space separated values aValueList
 // a case-sensitive search is performed if aCaseSensitive is true
 bool
 ChangeCSSInlineStyleTxn::ValueIncludes(const nsAString &aValueList, const nsAString &aValue, bool aCaseSensitive)
--- a/editor/libeditor/base/CreateElementTxn.cpp
+++ b/editor/libeditor/base/CreateElementTxn.cpp
@@ -25,20 +25,20 @@
 
 using namespace mozilla;
 
 CreateElementTxn::CreateElementTxn()
   : EditTxn()
 {
 }
 
-NS_IMPL_CYCLE_COLLECTION_INHERITED_3(CreateElementTxn, EditTxn,
-                                     mParent,
-                                     mNewNode,
-                                     mRefNode)
+NS_IMPL_CYCLE_COLLECTION_INHERITED(CreateElementTxn, EditTxn,
+                                   mParent,
+                                   mNewNode,
+                                   mRefNode)
 
 NS_IMPL_ADDREF_INHERITED(CreateElementTxn, EditTxn)
 NS_IMPL_RELEASE_INHERITED(CreateElementTxn, EditTxn)
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(CreateElementTxn)
 NS_INTERFACE_MAP_END_INHERITING(EditTxn)
 NS_IMETHODIMP CreateElementTxn::Init(nsEditor      *aEditor,
                                      const nsAString &aTag,
                                      nsINode       *aParent,
--- a/editor/libeditor/base/DeleteNodeTxn.cpp
+++ b/editor/libeditor/base/DeleteNodeTxn.cpp
@@ -12,20 +12,20 @@
 
 using namespace mozilla;
 
 DeleteNodeTxn::DeleteNodeTxn()
   : EditTxn(), mNode(), mParent(), mRefNode(), mRangeUpdater(nullptr)
 {
 }
 
-NS_IMPL_CYCLE_COLLECTION_INHERITED_3(DeleteNodeTxn, EditTxn,
-                                     mNode,
-                                     mParent,
-                                     mRefNode)
+NS_IMPL_CYCLE_COLLECTION_INHERITED(DeleteNodeTxn, EditTxn,
+                                   mNode,
+                                   mParent,
+                                   mRefNode)
 
 NS_IMPL_ADDREF_INHERITED(DeleteNodeTxn, EditTxn)
 NS_IMPL_RELEASE_INHERITED(DeleteNodeTxn, EditTxn)
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(DeleteNodeTxn)
 NS_INTERFACE_MAP_END_INHERITING(EditTxn)
 
 nsresult
 DeleteNodeTxn::Init(nsEditor* aEditor, nsINode* aNode,
--- a/editor/libeditor/base/DeleteRangeTxn.cpp
+++ b/editor/libeditor/base/DeleteRangeTxn.cpp
@@ -28,18 +28,18 @@ using namespace mozilla::dom;
 DeleteRangeTxn::DeleteRangeTxn()
   : EditAggregateTxn(),
     mRange(),
     mEditor(nullptr),
     mRangeUpdater(nullptr)
 {
 }
 
-NS_IMPL_CYCLE_COLLECTION_INHERITED_1(DeleteRangeTxn, EditAggregateTxn,
-                                     mRange)
+NS_IMPL_CYCLE_COLLECTION_INHERITED(DeleteRangeTxn, EditAggregateTxn,
+                                   mRange)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(DeleteRangeTxn)
 NS_INTERFACE_MAP_END_INHERITING(EditAggregateTxn)
 
 nsresult
 DeleteRangeTxn::Init(nsEditor* aEditor,
                      nsRange* aRange,
                      nsRangeUpdater* aRangeUpdater)
--- a/editor/libeditor/base/DeleteTextTxn.cpp
+++ b/editor/libeditor/base/DeleteTextTxn.cpp
@@ -24,18 +24,18 @@ DeleteTextTxn::DeleteTextTxn() :
   mEditor(nullptr),
   mCharData(),
   mOffset(0),
   mNumCharsToDelete(0),
   mRangeUpdater(nullptr)
 {
 }
 
-NS_IMPL_CYCLE_COLLECTION_INHERITED_1(DeleteTextTxn, EditTxn,
-                                     mCharData)
+NS_IMPL_CYCLE_COLLECTION_INHERITED(DeleteTextTxn, EditTxn,
+                                   mCharData)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(DeleteTextTxn)
 NS_INTERFACE_MAP_END_INHERITING(EditTxn)
 
 NS_IMETHODIMP
 DeleteTextTxn::Init(nsEditor* aEditor,
                     nsIDOMCharacterData* aCharData,
                     uint32_t aOffset,
--- a/editor/libeditor/base/EditAggregateTxn.cpp
+++ b/editor/libeditor/base/EditAggregateTxn.cpp
@@ -11,18 +11,18 @@
 #include "nsITransaction.h"             // for nsITransaction
 #include "nsString.h"                   // for nsAutoString
 
 EditAggregateTxn::EditAggregateTxn()
   : EditTxn()
 {
 }
 
-NS_IMPL_CYCLE_COLLECTION_INHERITED_1(EditAggregateTxn, EditTxn,
-                                     mChildren)
+NS_IMPL_CYCLE_COLLECTION_INHERITED(EditAggregateTxn, EditTxn,
+                                   mChildren)
 
 NS_IMPL_ADDREF_INHERITED(EditAggregateTxn, EditTxn)
 NS_IMPL_RELEASE_INHERITED(EditAggregateTxn, EditTxn)
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(EditAggregateTxn)
 NS_INTERFACE_MAP_END_INHERITING(EditTxn)
 
 NS_IMETHODIMP EditAggregateTxn::DoTransaction(void)
 {
--- a/editor/libeditor/base/IMETextTxn.cpp
+++ b/editor/libeditor/base/IMETextTxn.cpp
@@ -29,18 +29,18 @@ using namespace mozilla;
 
 // #define DEBUG_IMETXN
 
 IMETextTxn::IMETextTxn()
   : EditTxn()
 {
 }
 
-NS_IMPL_CYCLE_COLLECTION_INHERITED_1(IMETextTxn, EditTxn,
-                                     mElement)
+NS_IMPL_CYCLE_COLLECTION_INHERITED(IMETextTxn, EditTxn,
+                                   mElement)
 // mRangeList can't lead to cycles
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(IMETextTxn)
   if (aIID.Equals(IMETextTxn::GetCID())) {
     *aInstancePtr = (void*)(IMETextTxn*)this;
     NS_ADDREF_THIS();
     return NS_OK;
   } else
--- a/editor/libeditor/base/InsertElementTxn.cpp
+++ b/editor/libeditor/base/InsertElementTxn.cpp
@@ -19,19 +19,19 @@
 
 using namespace mozilla;
 
 InsertElementTxn::InsertElementTxn()
   : EditTxn()
 {
 }
 
-NS_IMPL_CYCLE_COLLECTION_INHERITED_2(InsertElementTxn, EditTxn,
-                                     mNode,
-                                     mParent)
+NS_IMPL_CYCLE_COLLECTION_INHERITED(InsertElementTxn, EditTxn,
+                                   mNode,
+                                   mParent)
 
 NS_IMPL_ADDREF_INHERITED(InsertElementTxn, EditTxn)
 NS_IMPL_RELEASE_INHERITED(InsertElementTxn, EditTxn)
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(InsertElementTxn)
 NS_INTERFACE_MAP_END_INHERITING(EditTxn)
 
 NS_IMETHODIMP InsertElementTxn::Init(nsINode *aNode,
                                      nsINode *aParent,
--- a/editor/libeditor/base/InsertTextTxn.cpp
+++ b/editor/libeditor/base/InsertTextTxn.cpp
@@ -15,18 +15,18 @@
 #include "nsISupportsUtils.h"           // for NS_ADDREF_THIS, NS_RELEASE
 #include "nsITransaction.h"             // for nsITransaction
 
 InsertTextTxn::InsertTextTxn()
   : EditTxn()
 {
 }
 
-NS_IMPL_CYCLE_COLLECTION_INHERITED_1(InsertTextTxn, EditTxn,
-                                     mElement)
+NS_IMPL_CYCLE_COLLECTION_INHERITED(InsertTextTxn, EditTxn,
+                                   mElement)
 
 NS_IMPL_ADDREF_INHERITED(InsertTextTxn, EditTxn)
 NS_IMPL_RELEASE_INHERITED(InsertTextTxn, EditTxn)
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(InsertTextTxn)
   if (aIID.Equals(InsertTextTxn::GetCID())) {
     *aInstancePtr = (void*)(InsertTextTxn*)this;
     NS_ADDREF_THIS();
     return NS_OK;
--- a/editor/libeditor/base/JoinElementTxn.cpp
+++ b/editor/libeditor/base/JoinElementTxn.cpp
@@ -17,20 +17,20 @@
 
 using namespace mozilla;
 
 JoinElementTxn::JoinElementTxn()
   : EditTxn()
 {
 }
 
-NS_IMPL_CYCLE_COLLECTION_INHERITED_3(JoinElementTxn, EditTxn,
-                                     mLeftNode,
-                                     mRightNode,
-                                     mParent)
+NS_IMPL_CYCLE_COLLECTION_INHERITED(JoinElementTxn, EditTxn,
+                                   mLeftNode,
+                                   mRightNode,
+                                   mParent)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(JoinElementTxn)
 NS_INTERFACE_MAP_END_INHERITING(EditTxn)
 
 NS_IMETHODIMP JoinElementTxn::Init(nsEditor   *aEditor,
                                    nsINode *aLeftNode,
                                    nsINode *aRightNode)
 {
--- a/editor/libeditor/base/SplitElementTxn.cpp
+++ b/editor/libeditor/base/SplitElementTxn.cpp
@@ -19,19 +19,19 @@
 using namespace mozilla;
 
 // note that aEditor is not refcounted
 SplitElementTxn::SplitElementTxn()
   : EditTxn()
 {
 }
 
-NS_IMPL_CYCLE_COLLECTION_INHERITED_2(SplitElementTxn, EditTxn,
-                                     mParent,
-                                     mNewLeftNode)
+NS_IMPL_CYCLE_COLLECTION_INHERITED(SplitElementTxn, EditTxn,
+                                   mParent,
+                                   mNewLeftNode)
 
 NS_IMPL_ADDREF_INHERITED(SplitElementTxn, EditTxn)
 NS_IMPL_RELEASE_INHERITED(SplitElementTxn, EditTxn)
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(SplitElementTxn)
 NS_INTERFACE_MAP_END_INHERITING(EditTxn)
 
 NS_IMETHODIMP SplitElementTxn::Init(nsEditor   *aEditor,
                                     nsINode    *aNode,
--- a/editor/libeditor/base/nsStyleSheetTxns.cpp
+++ b/editor/libeditor/base/nsStyleSheetTxns.cpp
@@ -46,18 +46,18 @@ RemoveStyleSheet(nsIEditor *aEditor, nsI
 }
 
 AddStyleSheetTxn::AddStyleSheetTxn()
 :  EditTxn()
 ,  mEditor(nullptr)
 {
 }
 
-NS_IMPL_CYCLE_COLLECTION_INHERITED_1(AddStyleSheetTxn, EditTxn,
-                                     mSheet)
+NS_IMPL_CYCLE_COLLECTION_INHERITED(AddStyleSheetTxn, EditTxn,
+                                   mSheet)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(AddStyleSheetTxn)
 NS_INTERFACE_MAP_END_INHERITING(EditTxn)
 
 NS_IMETHODIMP
 AddStyleSheetTxn::Init(nsIEditor *aEditor, nsCSSStyleSheet *aSheet)
 {
   NS_ENSURE_TRUE(aEditor && aSheet, NS_ERROR_INVALID_ARG);
@@ -96,18 +96,18 @@ AddStyleSheetTxn::GetTxnDescription(nsAS
 
 
 RemoveStyleSheetTxn::RemoveStyleSheetTxn()
 :  EditTxn()
 ,  mEditor(nullptr)
 {
 }
 
-NS_IMPL_CYCLE_COLLECTION_INHERITED_1(RemoveStyleSheetTxn, EditTxn,
-                                     mSheet)
+NS_IMPL_CYCLE_COLLECTION_INHERITED(RemoveStyleSheetTxn, EditTxn,
+                                   mSheet)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(RemoveStyleSheetTxn)
 NS_INTERFACE_MAP_END_INHERITING(EditTxn)
 
 NS_IMETHODIMP
 RemoveStyleSheetTxn::Init(nsIEditor *aEditor, nsCSSStyleSheet *aSheet)
 {
   NS_ENSURE_TRUE(aEditor && aSheet, NS_ERROR_INVALID_ARG);
--- a/editor/libeditor/html/TypeInState.cpp
+++ b/editor/libeditor/html/TypeInState.cpp
@@ -22,17 +22,17 @@
 
 class nsIAtom;
 class nsIDOMDocument;
 
 /********************************************************************
  *                     XPCOM cruft 
  *******************************************************************/
 
-NS_IMPL_CYCLE_COLLECTION_1(TypeInState, mLastSelectionContainer)
+NS_IMPL_CYCLE_COLLECTION(TypeInState, mLastSelectionContainer)
 NS_IMPL_CYCLE_COLLECTING_ADDREF(TypeInState)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(TypeInState)
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(TypeInState)
   NS_INTERFACE_MAP_ENTRY(nsISelectionListener)
   NS_INTERFACE_MAP_ENTRY(nsISupports)
 NS_INTERFACE_MAP_END
 
 /********************************************************************
--- a/editor/libeditor/text/nsTextEditRules.cpp
+++ b/editor/libeditor/text/nsTextEditRules.cpp
@@ -78,17 +78,17 @@ nsTextEditRules::~nsTextEditRules()
   if (mTimer)
     mTimer->Cancel();
 }
 
 /********************************************************
  *  XPCOM Cruft
  ********************************************************/
 
-NS_IMPL_CYCLE_COLLECTION_2(nsTextEditRules, mBogusNode, mCachedSelectionNode)
+NS_IMPL_CYCLE_COLLECTION(nsTextEditRules, mBogusNode, mCachedSelectionNode)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsTextEditRules)
   NS_INTERFACE_MAP_ENTRY(nsIEditRules)
   NS_INTERFACE_MAP_ENTRY(nsITimerCallback)
   NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIEditRules)
 NS_INTERFACE_MAP_END
 
 NS_IMPL_CYCLE_COLLECTING_ADDREF(nsTextEditRules)
--- a/editor/txtsvc/src/nsFilteredContentIterator.cpp
+++ b/editor/txtsvc/src/nsFilteredContentIterator.cpp
@@ -41,22 +41,22 @@ NS_IMPL_CYCLE_COLLECTING_ADDREF(nsFilter
 NS_IMPL_CYCLE_COLLECTING_RELEASE(nsFilteredContentIterator)
 
 NS_INTERFACE_MAP_BEGIN(nsFilteredContentIterator)
   NS_INTERFACE_MAP_ENTRY(nsIContentIterator)
   NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIContentIterator)
   NS_INTERFACE_MAP_ENTRIES_CYCLE_COLLECTION(nsFilteredContentIterator)
 NS_INTERFACE_MAP_END
 
-NS_IMPL_CYCLE_COLLECTION_5(nsFilteredContentIterator,
-                           mCurrentIterator,
-                           mIterator,
-                           mPreIterator,
-                           mFilter,
-                           mRange)
+NS_IMPL_CYCLE_COLLECTION(nsFilteredContentIterator,
+                         mCurrentIterator,
+                         mIterator,
+                         mPreIterator,
+                         mFilter,
+                         mRange)
 
 //------------------------------------------------------------
 nsresult
 nsFilteredContentIterator::Init(nsINode* aRoot)
 {
   NS_ENSURE_ARG_POINTER(aRoot);
   NS_ENSURE_TRUE(mPreIterator, NS_ERROR_FAILURE);
   NS_ENSURE_TRUE(mIterator, NS_ERROR_FAILURE);
--- a/editor/txtsvc/src/nsTextServicesDocument.cpp
+++ b/editor/txtsvc/src/nsTextServicesDocument.cpp
@@ -117,24 +117,24 @@ NS_IMPL_CYCLE_COLLECTING_RELEASE(nsTextS
 
 NS_INTERFACE_MAP_BEGIN(nsTextServicesDocument)
   NS_INTERFACE_MAP_ENTRY(nsITextServicesDocument)
   NS_INTERFACE_MAP_ENTRY(nsIEditActionListener)
   NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsITextServicesDocument)
   NS_INTERFACE_MAP_ENTRIES_CYCLE_COLLECTION(nsTextServicesDocument)
 NS_INTERFACE_MAP_END
 
-NS_IMPL_CYCLE_COLLECTION_7(nsTextServicesDocument,
-                           mDOMDocument,
-                           mSelCon,
-                           mIterator,
-                           mPrevTextBlock,
-                           mNextTextBlock,
-                           mExtent,
-                           mTxtSvcFilter)
+NS_IMPL_CYCLE_COLLECTION(nsTextServicesDocument,
+                         mDOMDocument,
+                         mSelCon,
+                         mIterator,
+                         mPrevTextBlock,
+                         mNextTextBlock,
+                         mExtent,
+                         mTxtSvcFilter)
 
 NS_IMETHODIMP
 nsTextServicesDocument::InitWithEditor(nsIEditor *aEditor)
 {
   nsresult result = NS_OK;
   nsCOMPtr<nsISelectionController> selCon;
   nsCOMPtr<nsIDOMDocument> doc;
 
--- a/embedding/components/find/src/nsFind.cpp
+++ b/embedding/components/find/src/nsFind.cpp
@@ -141,18 +141,18 @@ private:
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsFindContentIterator)
   NS_INTERFACE_MAP_ENTRY(nsIContentIterator)
   NS_INTERFACE_MAP_ENTRY(nsISupports)
 NS_INTERFACE_MAP_END
 
 NS_IMPL_CYCLE_COLLECTING_ADDREF(nsFindContentIterator)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(nsFindContentIterator)
 
-NS_IMPL_CYCLE_COLLECTION_6(nsFindContentIterator, mOuterIterator, mInnerIterator,
-                           mStartOuterContent, mEndOuterContent, mEndNode, mStartNode)
+NS_IMPL_CYCLE_COLLECTION(nsFindContentIterator, mOuterIterator, mInnerIterator,
+                         mStartOuterContent, mEndOuterContent, mEndNode, mStartNode)
 
 
 nsresult
 nsFindContentIterator::Init(nsIDOMNode* aStartNode, int32_t aStartOffset,
                             nsIDOMNode* aEndNode, int32_t aEndOffset)
 {
   NS_ENSURE_ARG_POINTER(aStartNode);
   NS_ENSURE_ARG_POINTER(aEndNode);
@@ -450,17 +450,17 @@ NS_NewFindContentIterator(bool aFindBack
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsFind)
   NS_INTERFACE_MAP_ENTRY(nsIFind)
   NS_INTERFACE_MAP_ENTRY(nsISupports)
 NS_INTERFACE_MAP_END
 
 NS_IMPL_CYCLE_COLLECTING_ADDREF(nsFind)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(nsFind)
 
-  NS_IMPL_CYCLE_COLLECTION_3(nsFind, mLastBlockParent, mIterNode, mIterator)
+  NS_IMPL_CYCLE_COLLECTION(nsFind, mLastBlockParent, mIterNode, mIterator)
 
 nsFind::nsFind()
   : mFindBackward(false)
   , mCaseSensitive(false)
   , mIterOffset(0)
 {
 }
 
--- a/extensions/spellcheck/hunspell/src/mozHunspell.cpp
+++ b/extensions/spellcheck/hunspell/src/mozHunspell.cpp
@@ -86,20 +86,20 @@ NS_INTERFACE_MAP_BEGIN(mozHunspell)
   NS_INTERFACE_MAP_ENTRY(mozISpellCheckingEngine)
   NS_INTERFACE_MAP_ENTRY(nsIObserver)
   NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference)
   NS_INTERFACE_MAP_ENTRY(nsIMemoryReporter)
   NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, mozISpellCheckingEngine)
   NS_INTERFACE_MAP_ENTRIES_CYCLE_COLLECTION(mozHunspell)
 NS_INTERFACE_MAP_END
 
-NS_IMPL_CYCLE_COLLECTION_3(mozHunspell,
-                           mPersonalDictionary,
-                           mEncoder,
-                           mDecoder)
+NS_IMPL_CYCLE_COLLECTION(mozHunspell,
+                         mPersonalDictionary,
+                         mEncoder,
+                         mDecoder)
 
 template<> mozilla::Atomic<size_t> mozilla::CountingAllocatorBase<HunspellAllocator>::sAmount(0);
 
 mozHunspell::mozHunspell()
   : mHunspell(nullptr)
 {
 #ifdef DEBUG
   // There must be only one instance of this class: it reports memory based on
--- a/extensions/spellcheck/src/mozEnglishWordUtils.cpp
+++ b/extensions/spellcheck/src/mozEnglishWordUtils.cpp
@@ -16,18 +16,18 @@ NS_IMPL_CYCLE_COLLECTING_ADDREF(mozEngli
 NS_IMPL_CYCLE_COLLECTING_RELEASE(mozEnglishWordUtils)
 
 NS_INTERFACE_MAP_BEGIN(mozEnglishWordUtils)
   NS_INTERFACE_MAP_ENTRY(mozISpellI18NUtil)
   NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, mozISpellI18NUtil)
   NS_INTERFACE_MAP_ENTRIES_CYCLE_COLLECTION(mozEnglishWordUtils)
 NS_INTERFACE_MAP_END
 
-NS_IMPL_CYCLE_COLLECTION_1(mozEnglishWordUtils,
-                           mURLDetector)
+NS_IMPL_CYCLE_COLLECTION(mozEnglishWordUtils,
+                         mURLDetector)
 
 mozEnglishWordUtils::mozEnglishWordUtils()
 {
   mLanguage.AssignLiteral("en");
 
   nsresult rv;
   mURLDetector = do_CreateInstance(MOZ_TXTTOHTMLCONV_CONTRACTID, &rv);
 }
--- a/extensions/spellcheck/src/mozInlineSpellChecker.cpp
+++ b/extensions/spellcheck/src/mozInlineSpellChecker.cpp
@@ -518,20 +518,20 @@ NS_INTERFACE_MAP_BEGIN(mozInlineSpellChe
   NS_INTERFACE_MAP_ENTRY(nsIDOMEventListener)
   NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIDOMEventListener)
   NS_INTERFACE_MAP_ENTRIES_CYCLE_COLLECTION(mozInlineSpellChecker)
 NS_INTERFACE_MAP_END
 
 NS_IMPL_CYCLE_COLLECTING_ADDREF(mozInlineSpellChecker)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(mozInlineSpellChecker)
 
-NS_IMPL_CYCLE_COLLECTION_3(mozInlineSpellChecker,
-                           mSpellCheck,
-                           mTreeWalker,
-                           mCurrentSelectionAnchorNode)
+NS_IMPL_CYCLE_COLLECTION(mozInlineSpellChecker,
+                         mSpellCheck,
+                         mTreeWalker,
+                         mCurrentSelectionAnchorNode)
 
 mozInlineSpellChecker::SpellCheckingState
   mozInlineSpellChecker::gCanEnableSpellChecking =
   mozInlineSpellChecker::SpellCheck_Uninitialized;
 
 mozInlineSpellChecker::mozInlineSpellChecker() :
     mNumWordsInSpellSelection(0),
     mMaxNumWordsInSpellSelection(250),
--- a/extensions/spellcheck/src/mozPersonalDictionary.cpp
+++ b/extensions/spellcheck/src/mozPersonalDictionary.cpp
@@ -40,17 +40,17 @@ NS_IMPL_CYCLE_COLLECTING_RELEASE(mozPers
 NS_INTERFACE_MAP_BEGIN(mozPersonalDictionary)
   NS_INTERFACE_MAP_ENTRY(mozIPersonalDictionary)
   NS_INTERFACE_MAP_ENTRY(nsIObserver)
   NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference)
   NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, mozIPersonalDictionary)
   NS_INTERFACE_MAP_ENTRIES_CYCLE_COLLECTION(mozPersonalDictionary)
 NS_INTERFACE_MAP_END
 
-NS_IMPL_CYCLE_COLLECTION_1(mozPersonalDictionary, mEncoder)
+NS_IMPL_CYCLE_COLLECTION(mozPersonalDictionary, mEncoder)
 
 mozPersonalDictionary::mozPersonalDictionary()
  : mDirty(false)
 {
 }
 
 mozPersonalDictionary::~mozPersonalDictionary()
 {
--- a/extensions/spellcheck/src/mozSpellChecker.cpp
+++ b/extensions/spellcheck/src/mozSpellChecker.cpp
@@ -17,19 +17,19 @@ NS_IMPL_CYCLE_COLLECTING_ADDREF(mozSpell
 NS_IMPL_CYCLE_COLLECTING_RELEASE(mozSpellChecker)
 
 NS_INTERFACE_MAP_BEGIN(mozSpellChecker)
   NS_INTERFACE_MAP_ENTRY(nsISpellChecker)
   NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsISpellChecker)
   NS_INTERFACE_MAP_ENTRIES_CYCLE_COLLECTION(mozSpellChecker)
 NS_INTERFACE_MAP_END
 
-NS_IMPL_CYCLE_COLLECTION_2(mozSpellChecker,
-                           mTsDoc,
-                           mPersonalDictionary)
+NS_IMPL_CYCLE_COLLECTION(mozSpellChecker,
+                         mTsDoc,
+                         mPersonalDictionary)
 
 mozSpellChecker::mozSpellChecker()
 {
 }
 
 mozSpellChecker::~mozSpellChecker()
 {
   if(mPersonalDictionary){
--- a/image/src/ScriptedNotificationObserver.cpp
+++ b/image/src/ScriptedNotificationObserver.cpp
@@ -5,17 +5,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "ScriptedNotificationObserver.h"
 #include "imgIScriptedNotificationObserver.h"
 #include "nsCycleCollectionParticipant.h"
 
 using namespace mozilla::image;
 
-NS_IMPL_CYCLE_COLLECTION_1(ScriptedNotificationObserver, mInner)
+NS_IMPL_CYCLE_COLLECTION(ScriptedNotificationObserver, mInner)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(ScriptedNotificationObserver)
   NS_INTERFACE_MAP_ENTRY(imgINotificationObserver)
   NS_INTERFACE_MAP_ENTRY(nsISupports)
 NS_INTERFACE_MAP_END
 
 NS_IMPL_CYCLE_COLLECTING_ADDREF(ScriptedNotificationObserver)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(ScriptedNotificationObserver)
--- a/js/jsd/jsd_xpc.cpp
+++ b/js/jsd/jsd_xpc.cpp
@@ -2377,21 +2377,21 @@ jsdValue::GetScript(jsdIScript **_rval)
  * debugger service implementation
  ******************************************************************************/
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(jsdService)
   NS_INTERFACE_MAP_ENTRY(jsdIDebuggerService)
   NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, jsdIDebuggerService)
 NS_INTERFACE_MAP_END
 
-NS_IMPL_CYCLE_COLLECTION_10(jsdService,
-                            mErrorHook, mBreakpointHook, mDebugHook,
-                            mDebuggerHook, mInterruptHook, mScriptHook,
-                            mThrowHook, mTopLevelHook, mFunctionHook,
-                            mActivationCallback)
+NS_IMPL_CYCLE_COLLECTION(jsdService,
+                         mErrorHook, mBreakpointHook, mDebugHook,
+                         mDebuggerHook, mInterruptHook, mScriptHook,
+                         mThrowHook, mTopLevelHook, mFunctionHook,
+                         mActivationCallback)
 NS_IMPL_CYCLE_COLLECTING_ADDREF(jsdService)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(jsdService)
 
 NS_IMETHODIMP
 jsdService::GetJSDContext(JSDContext **_rval)
 {
     *_rval = mCx;
     return NS_OK;
--- a/layout/xul/nsXULPopupManager.cpp
+++ b/layout/xul/nsXULPopupManager.cpp
@@ -968,17 +968,17 @@ public:
 
 NS_IMPL_CYCLE_COLLECTING_ADDREF(TransitionEnder)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(TransitionEnder)
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(TransitionEnder)
   NS_INTERFACE_MAP_ENTRY(nsIDOMEventListener)
   NS_INTERFACE_MAP_ENTRY(nsISupports)
 NS_INTERFACE_MAP_END
 
-NS_IMPL_CYCLE_COLLECTION_1(TransitionEnder, mContent);
+NS_IMPL_CYCLE_COLLECTION(TransitionEnder, mContent);
 
 void
 nsXULPopupManager::HidePopupCallback(nsIContent* aPopup,
                                      nsMenuPopupFrame* aPopupFrame,
                                      nsIContent* aNextPopup,
                                      nsIContent* aLastPopup,
                                      nsPopupType aPopupType,
                                      bool aDeselectMenu)
--- a/layout/xul/tree/nsTreeBoxObject.cpp
+++ b/layout/xul/tree/nsTreeBoxObject.cpp
@@ -9,17 +9,17 @@
 #include "nsIXULTemplateBuilder.h"
 #include "nsTreeContentView.h"
 #include "nsITreeSelection.h"
 #include "ChildIterator.h"
 #include "nsContentUtils.h"
 #include "nsError.h"
 #include "nsTreeBodyFrame.h"
 
-NS_IMPL_CYCLE_COLLECTION_1(nsTreeBoxObject, mView)
+NS_IMPL_CYCLE_COLLECTION(nsTreeBoxObject, mView)
 
 NS_IMPL_ADDREF_INHERITED(nsTreeBoxObject, nsBoxObject)
 NS_IMPL_RELEASE_INHERITED(nsTreeBoxObject, nsBoxObject)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(nsTreeBoxObject)
   NS_INTERFACE_MAP_ENTRY(nsITreeBoxObject)
 NS_INTERFACE_MAP_END_INHERITING(nsBoxObject)
 
--- a/layout/xul/tree/nsTreeContentView.cpp
+++ b/layout/xul/tree/nsTreeContentView.cpp
@@ -105,21 +105,21 @@ NS_NewTreeContentView(nsITreeView** aRes
 {
   *aResult = new nsTreeContentView;
   if (! *aResult)
     return NS_ERROR_OUT_OF_MEMORY;
   NS_ADDREF(*aResult);
   return NS_OK;
 }
 
-NS_IMPL_CYCLE_COLLECTION_4(nsTreeContentView,
-                           mBoxObject,
-                           mSelection,
-                           mRoot,
-                           mBody)
+NS_IMPL_CYCLE_COLLECTION(nsTreeContentView,
+                         mBoxObject,
+                         mSelection,
+                         mRoot,
+                         mBody)
 
 NS_IMPL_CYCLE_COLLECTING_ADDREF(nsTreeContentView)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(nsTreeContentView)
 
 DOMCI_DATA(TreeContentView, nsTreeContentView)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsTreeContentView)
   NS_INTERFACE_MAP_ENTRY(nsITreeView)
--- a/layout/xul/tree/nsTreeSelection.cpp
+++ b/layout/xul/tree/nsTreeSelection.cpp
@@ -253,17 +253,17 @@ nsTreeSelection::nsTreeSelection(nsITree
 
 nsTreeSelection::~nsTreeSelection()
 {
   delete mFirstRange;
   if (mSelectTimer)
     mSelectTimer->Cancel();
 }
 
-NS_IMPL_CYCLE_COLLECTION_2(nsTreeSelection, mTree, mCurrentColumn)
+NS_IMPL_CYCLE_COLLECTION(nsTreeSelection, mTree, mCurrentColumn)
 
 NS_IMPL_CYCLE_COLLECTING_ADDREF(nsTreeSelection)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(nsTreeSelection)
 
 DOMCI_DATA(TreeSelection, nsTreeSelection)
 
 // QueryInterface implementation for nsBoxObject
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsTreeSelection)
--- a/parser/html/nsHtml5DocumentBuilder.cpp
+++ b/parser/html/nsHtml5DocumentBuilder.cpp
@@ -6,18 +6,18 @@
 
 #include "nsHtml5DocumentBuilder.h"
 
 #include "nsIStyleSheetLinkingElement.h"
 #include "nsStyleLinkElement.h"
 #include "nsScriptLoader.h"
 #include "nsIHTMLDocument.h"
 
-NS_IMPL_CYCLE_COLLECTION_INHERITED_1(nsHtml5DocumentBuilder, nsContentSink,
-                                     mOwnedElements)
+NS_IMPL_CYCLE_COLLECTION_INHERITED(nsHtml5DocumentBuilder, nsContentSink,
+                                   mOwnedElements)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(nsHtml5DocumentBuilder)
 NS_INTERFACE_MAP_END_INHERITING(nsContentSink)
 
 NS_IMPL_ADDREF_INHERITED(nsHtml5DocumentBuilder, nsContentSink)
 NS_IMPL_RELEASE_INHERITED(nsHtml5DocumentBuilder, nsContentSink)
 
 nsHtml5DocumentBuilder::nsHtml5DocumentBuilder(bool aRunsToCompletion)
--- a/parser/htmlparser/src/nsExpatDriver.cpp
+++ b/parser/htmlparser/src/nsExpatDriver.cpp
@@ -333,17 +333,17 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(
   NS_INTERFACE_MAP_ENTRY(nsITokenizer)
   NS_INTERFACE_MAP_ENTRY(nsIDTD)
   NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIDTD)
 NS_INTERFACE_MAP_END
 
 NS_IMPL_CYCLE_COLLECTING_ADDREF(nsExpatDriver)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(nsExpatDriver)
 
-NS_IMPL_CYCLE_COLLECTION_2(nsExpatDriver, mSink, mExtendedSink)
+NS_IMPL_CYCLE_COLLECTION(nsExpatDriver, mSink, mExtendedSink)
 
 nsExpatDriver::nsExpatDriver()
   : mExpatParser(nullptr),
     mInCData(false),
     mInInternalSubset(false),
     mInExternalDTD(false),
     mMadeFinalCallToExpat(false),
     mIsFinalChunk(false),
--- a/parser/xml/src/nsSAXXMLReader.cpp
+++ b/parser/xml/src/nsSAXXMLReader.cpp
@@ -19,25 +19,25 @@
 #include "mozilla/dom/EncodingUtils.h"
 
 using mozilla::dom::EncodingUtils;
 
 #define XMLNS_URI "http://www.w3.org/2000/xmlns/"
 
 static NS_DEFINE_CID(kParserCID, NS_PARSER_CID);
 
-NS_IMPL_CYCLE_COLLECTION_8(nsSAXXMLReader,
-                           mContentHandler,
-                           mDTDHandler,
-                           mErrorHandler,
-                           mLexicalHandler,
-                           mDeclarationHandler,
-                           mBaseURI,
-                           mListener,
-                           mParserObserver)
+NS_IMPL_CYCLE_COLLECTION(nsSAXXMLReader,
+                         mContentHandler,
+                         mDTDHandler,
+                         mErrorHandler,
+                         mLexicalHandler,
+                         mDeclarationHandler,
+                         mBaseURI,
+                         mListener,
+                         mParserObserver)
 NS_IMPL_CYCLE_COLLECTING_ADDREF(nsSAXXMLReader)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(nsSAXXMLReader)
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsSAXXMLReader)
   NS_INTERFACE_MAP_ENTRY(nsISAXXMLReader)
   NS_INTERFACE_MAP_ENTRY(nsIExpatSink)
   NS_INTERFACE_MAP_ENTRY(nsIExtendedExpatSink)
   NS_INTERFACE_MAP_ENTRY(nsIContentSink)
   NS_INTERFACE_MAP_ENTRY(nsIRequestObserver)
--- a/rdf/datasource/src/nsLocalStore.cpp
+++ b/rdf/datasource/src/nsLocalStore.cpp
@@ -228,17 +228,17 @@ NS_NewLocalStore(nsISupports* aOuter, RE
         // Set up the result pointer
         rv = impl->QueryInterface(aIID, aResult);
     }
 
     NS_RELEASE(impl);
     return rv;
 }
 
-NS_IMPL_CYCLE_COLLECTION_1(LocalStoreImpl, mInner)
+NS_IMPL_CYCLE_COLLECTION(LocalStoreImpl, mInner)
 NS_IMPL_CYCLE_COLLECTING_ADDREF(LocalStoreImpl)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(LocalStoreImpl)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(LocalStoreImpl)
     NS_INTERFACE_MAP_ENTRY(nsILocalStore)
     NS_INTERFACE_MAP_ENTRY(nsIRDFDataSource)
     NS_INTERFACE_MAP_ENTRY(nsIRDFRemoteDataSource)
     NS_INTERFACE_MAP_ENTRY(nsIObserver)
--- a/toolkit/components/places/nsNavHistoryResult.cpp
+++ b/toolkit/components/places/nsNavHistoryResult.cpp
@@ -70,17 +70,17 @@ inline int32_t ComparePRTime(PRTime a, P
 inline int32_t CompareIntegers(uint32_t a, uint32_t b)
 {
   return a - b;
 }
 
 using namespace mozilla;
 using namespace mozilla::places;
 
-NS_IMPL_CYCLE_COLLECTION_1(nsNavHistoryResultNode, mParent)
+NS_IMPL_CYCLE_COLLECTION(nsNavHistoryResultNode, mParent)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsNavHistoryResultNode)
   NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsINavHistoryResultNode)
   NS_INTERFACE_MAP_ENTRY(nsINavHistoryResultNode)
 NS_INTERFACE_MAP_END
 
 NS_IMPL_CYCLE_COLLECTING_ADDREF(nsNavHistoryResultNode)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(nsNavHistoryResultNode)
@@ -303,19 +303,19 @@ nsNavHistoryResultNode::GetGeneratingOpt
     cur = cur->mParent;
   }
 
   // We should always find a container node as an ancestor.
   NS_NOTREACHED("Can't find a generating node for this container, the tree seemes corrupted.");
   return nullptr;
 }
 
-NS_IMPL_CYCLE_COLLECTION_INHERITED_2(nsNavHistoryContainerResultNode, nsNavHistoryResultNode,
-                                     mResult,
-                                     mChildren)
+NS_IMPL_CYCLE_COLLECTION_INHERITED(nsNavHistoryContainerResultNode, nsNavHistoryResultNode,
+                                   mResult,
+                                   mChildren)
 
 NS_IMPL_ADDREF_INHERITED(nsNavHistoryContainerResultNode, nsNavHistoryResultNode)
 NS_IMPL_RELEASE_INHERITED(nsNavHistoryContainerResultNode, nsNavHistoryResultNode)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(nsNavHistoryContainerResultNode)
   NS_INTERFACE_MAP_STATIC_AMBIGUOUS(nsNavHistoryContainerResultNode)
   NS_INTERFACE_MAP_ENTRY(nsINavHistoryContainerResultNode)
 NS_INTERFACE_MAP_END_INHERITING(nsNavHistoryResultNode)
--- a/toolkit/components/typeaheadfind/nsTypeAheadFind.cpp
+++ b/toolkit/components/typeaheadfind/nsTypeAheadFind.cpp
@@ -58,20 +58,20 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(
   NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsITypeAheadFind)
   NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference)
   NS_INTERFACE_MAP_ENTRY(nsIObserver)
 NS_INTERFACE_MAP_END
 
 NS_IMPL_CYCLE_COLLECTING_ADDREF(nsTypeAheadFind)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(nsTypeAheadFind)
 
-NS_IMPL_CYCLE_COLLECTION_9(nsTypeAheadFind, mFoundLink, mFoundEditable,
-                           mCurrentWindow, mStartFindRange, mSearchRange,
-                           mStartPointRange, mEndPointRange, mSoundInterface,
-                           mFind)
+NS_IMPL_CYCLE_COLLECTION(nsTypeAheadFind, mFoundLink, mFoundEditable,
+                         mCurrentWindow, mStartFindRange, mSearchRange,
+                         mStartPointRange, mEndPointRange, mSoundInterface,
+                         mFind)
 
 static NS_DEFINE_CID(kFrameTraversalCID, NS_FRAMETRAVERSAL_CID);
 
 #define NS_FIND_CONTRACTID "@mozilla.org/embedcomp/rangefind;1"
 
 nsTypeAheadFind::nsTypeAheadFind():
   mStartLinksOnlyPref(false),
   mCaretBrowsingOn(false),
--- a/widget/windows/JumpListItem.cpp
+++ b/widget/windows/JumpListItem.cpp
@@ -33,17 +33,17 @@ NS_IMPL_ISUPPORTS_INHERITED1(JumpListSep
 NS_IMPL_ISUPPORTS_INHERITED1(JumpListLink,
                              JumpListItem,
                              nsIJumpListLink)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(JumpListShortcut)
   NS_INTERFACE_MAP_ENTRY(nsIJumpListShortcut)
 NS_INTERFACE_MAP_END_INHERITING(JumpListItem)
 
-NS_IMPL_CYCLE_COLLECTION_1(JumpListShortcut, mHandlerApp)
+NS_IMPL_CYCLE_COLLECTION(JumpListShortcut, mHandlerApp)
 
 NS_IMPL_CYCLE_COLLECTING_ADDREF(JumpListShortcut)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(JumpListShortcut)
 
 /* attribute short type; */
 NS_IMETHODIMP JumpListItem::GetType(int16_t *aType)
 {
   NS_ENSURE_ARG_POINTER(aType);
--- a/xpfe/components/directory/nsDirectoryViewer.cpp
+++ b/xpfe/components/directory/nsDirectoryViewer.cpp
@@ -78,17 +78,17 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(
     NS_INTERFACE_MAP_ENTRY(nsIStreamListener)
     NS_INTERFACE_MAP_ENTRY(nsIDirIndexListener)
     NS_INTERFACE_MAP_ENTRY(nsIRequestObserver)
     NS_INTERFACE_MAP_ENTRY(nsIInterfaceRequestor)
     NS_INTERFACE_MAP_ENTRY(nsIFTPEventSink)
     NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIHTTPIndex)
 NS_INTERFACE_MAP_END
 
-NS_IMPL_CYCLE_COLLECTION_1(nsHTTPIndex, mInner)
+NS_IMPL_CYCLE_COLLECTION(nsHTTPIndex, mInner)
 NS_IMPL_CYCLE_COLLECTING_ADDREF(nsHTTPIndex)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(nsHTTPIndex)
 
 NS_IMETHODIMP
 nsHTTPIndex::GetInterface(const nsIID &anIID, void **aResult ) 
 {
     if (anIID.Equals(NS_GET_IID(nsIFTPEventSink))) {
         // If we don't have a container to store the logged data