Backed out changeset 9306866e8df0 (bug 1395636) for build bustage. r=backout on a CLOSED TREE
authorSebastian Hengst <archaeopteryx@coole-files.de>
Wed, 06 Sep 2017 19:18:06 +0200
changeset 428699 5857b229d11f90fbc8890e8580eed1bca2bdd8c1
parent 428698 3b0e6ed5b2a01fe19b664fb3f2f75ee018b4cf8b
child 428700 16290ce48f84f5c2224894155291c894ad759d0c
push id7761
push userjlund@mozilla.com
push dateFri, 15 Sep 2017 00:19:52 +0000
treeherdermozilla-beta@c38455951db4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1395636
milestone57.0a1
backs out9306866e8df05caa6995169d31111cd4e16c3587
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
Backed out changeset 9306866e8df0 (bug 1395636) for build bustage. r=backout on a CLOSED TREE
dom/html/HTMLFieldSetElement.cpp
dom/html/HTMLFormElement.cpp
dom/html/HTMLImageElement.cpp
dom/html/HTMLInputElement.cpp
dom/html/HTMLLinkElement.cpp
dom/html/HTMLMapElement.cpp
dom/html/HTMLObjectElement.cpp
dom/html/HTMLSelectElement.cpp
dom/html/HTMLStyleElement.cpp
dom/html/HTMLTextAreaElement.cpp
dom/html/ImageDocument.cpp
dom/html/PluginDocument.cpp
dom/html/nsGenericHTMLFrameElement.cpp
dom/html/nsHTMLContentSink.cpp
dom/html/nsHTMLDocument.cpp
dom/svg/SVGAElement.cpp
dom/svg/SVGMPathElement.cpp
dom/svg/SVGSVGElement.cpp
dom/svg/SVGStyleElement.cpp
dom/svg/SVGUseElement.cpp
dom/xml/XMLStylesheetProcessingInstruction.cpp
dom/xul/XULDocument.cpp
editor/libeditor/HTMLEditRules.cpp
parser/html/nsHtml5TreeOpExecutor.cpp
--- a/dom/html/HTMLFieldSetElement.cpp
+++ b/dom/html/HTMLFieldSetElement.cpp
@@ -33,22 +33,29 @@ HTMLFieldSetElement::HTMLFieldSetElement
 HTMLFieldSetElement::~HTMLFieldSetElement()
 {
   uint32_t length = mDependentElements.Length();
   for (uint32_t i = 0; i < length; ++i) {
     mDependentElements[i]->ForgetFieldSet(this);
   }
 }
 
+// nsISupports
+
 NS_IMPL_CYCLE_COLLECTION_INHERITED(HTMLFieldSetElement, nsGenericHTMLFormElement,
                                    mValidity, mElements)
 
-NS_IMPL_ISUPPORTS_CYCLE_COLLECTION_INHERITED(HTMLFieldSetElement,
-                                             nsGenericHTMLFormElement,
-                                             nsIConstraintValidation)
+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_INHERITED(HTMLFieldSetElement,
+                               nsIConstraintValidation)
+NS_INTERFACE_TABLE_TAIL_INHERITING(nsGenericHTMLFormElement)
 
 NS_IMPL_ELEMENT_CLONE(HTMLFieldSetElement)
 
 
 bool
 HTMLFieldSetElement::IsDisabledForEvents(EventMessage aMessage)
 {
   return IsElementDisabledForEvents(aMessage, nullptr);
--- a/dom/html/HTMLFormElement.cpp
+++ b/dom/html/HTMLFormElement.cpp
@@ -144,22 +144,28 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
 
 NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(HTMLFormElement,
                                                 nsGenericHTMLElement)
   tmp->Clear();
   tmp->mExpandoAndGeneration.OwnerUnlinked();
 NS_IMPL_CYCLE_COLLECTION_UNLINK_END
 
-NS_IMPL_ISUPPORTS_CYCLE_COLLECTION_INHERITED(HTMLFormElement,
-                                             nsGenericHTMLElement,
-                                             nsIDOMHTMLFormElement,
-                                             nsIForm,
-                                             nsIWebProgressListener,
-                                             nsIRadioGroupContainer)
+NS_IMPL_ADDREF_INHERITED(HTMLFormElement, Element)
+NS_IMPL_RELEASE_INHERITED(HTMLFormElement, Element)
+
+
+// QueryInterface implementation for HTMLFormElement
+NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(HTMLFormElement)
+  NS_INTERFACE_TABLE_INHERITED(HTMLFormElement,
+                               nsIDOMHTMLFormElement,
+                               nsIForm,
+                               nsIWebProgressListener,
+                               nsIRadioGroupContainer)
+NS_INTERFACE_TABLE_TAIL_INHERITING(nsGenericHTMLElement)
 
 // EventTarget
 void
 HTMLFormElement::AsyncEventRunning(AsyncEventDispatcher* aEvent)
 {
   if (mFormPasswordEventDispatcher == aEvent) {
     mFormPasswordEventDispatcher = nullptr;
   }
--- a/dom/html/HTMLImageElement.cpp
+++ b/dom/html/HTMLImageElement.cpp
@@ -127,26 +127,32 @@ HTMLImageElement::HTMLImageElement(alrea
 }
 
 HTMLImageElement::~HTMLImageElement()
 {
   DestroyImageLoadingContent();
 }
 
 
+NS_IMPL_ADDREF_INHERITED(HTMLImageElement, Element)
+NS_IMPL_RELEASE_INHERITED(HTMLImageElement, Element)
+
 NS_IMPL_CYCLE_COLLECTION_INHERITED(HTMLImageElement,
                                    nsGenericHTMLElement,
                                    mResponsiveSelector)
 
-NS_IMPL_ISUPPORTS_CYCLE_COLLECTION_INHERITED(HTMLImageElement,
-                                             nsGenericHTMLElement,
-                                             nsIDOMHTMLImageElement,
-                                             nsIImageLoadingContent,
-                                             imgIOnloadBlocker,
-                                             imgINotificationObserver)
+// QueryInterface implementation for HTMLImageElement
+NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(HTMLImageElement)
+  NS_INTERFACE_TABLE_INHERITED(HTMLImageElement,
+                               nsIDOMHTMLImageElement,
+                               nsIImageLoadingContent,
+                               imgIOnloadBlocker,
+                               imgINotificationObserver)
+NS_INTERFACE_TABLE_TAIL_INHERITING(nsGenericHTMLElement)
+
 
 NS_IMPL_ELEMENT_CLONE(HTMLImageElement)
 
 
 bool
 HTMLImageElement::IsInteractiveHTMLContent(bool aIgnoreTabindex) const
 {
   return HasAttr(kNameSpaceID_None, nsGkAtoms::usemap) ||
--- a/dom/html/HTMLInputElement.cpp
+++ b/dom/html/HTMLInputElement.cpp
@@ -1245,25 +1245,30 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_IN
   }
 
   if (tmp->mFileData) {
     tmp->mFileData->Unlink();
   }
   //XXX should unlink more?
 NS_IMPL_CYCLE_COLLECTION_UNLINK_END
 
-NS_IMPL_ISUPPORTS_CYCLE_COLLECTION_INHERITED(HTMLInputElement,
-                                             nsGenericHTMLFormElementWithState,
-                                             nsIDOMHTMLInputElement,
-                                             nsITextControlElement,
-                                             imgINotificationObserver,
-                                             nsIImageLoadingContent,
-                                             imgIOnloadBlocker,
-                                             nsIDOMNSEditableElement,
-                                             nsIConstraintValidation)
+NS_IMPL_ADDREF_INHERITED(HTMLInputElement, Element)
+NS_IMPL_RELEASE_INHERITED(HTMLInputElement, Element)
+
+// QueryInterface implementation for HTMLInputElement
+NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(HTMLInputElement)
+  NS_INTERFACE_TABLE_INHERITED(HTMLInputElement,
+                               nsIDOMHTMLInputElement,
+                               nsITextControlElement,
+                               imgINotificationObserver,
+                               nsIImageLoadingContent,
+                               imgIOnloadBlocker,
+                               nsIDOMNSEditableElement,
+                               nsIConstraintValidation)
+NS_INTERFACE_TABLE_TAIL_INHERITING(nsGenericHTMLFormElementWithState)
 
 // nsIDOMNode
 
 nsresult
 HTMLInputElement::Clone(mozilla::dom::NodeInfo* aNodeInfo, nsINode** aResult,
                         bool aPreallocateArrays) const
 {
   *aResult = nullptr;
--- a/dom/html/HTMLLinkElement.cpp
+++ b/dom/html/HTMLLinkElement.cpp
@@ -70,21 +70,28 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
 
 NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(HTMLLinkElement,
                                                 nsGenericHTMLElement)
   tmp->nsStyleLinkElement::Unlink();
   NS_IMPL_CYCLE_COLLECTION_UNLINK(mRelList)
 NS_IMPL_CYCLE_COLLECTION_UNLINK_END
 
-NS_IMPL_ISUPPORTS_CYCLE_COLLECTION_INHERITED(HTMLLinkElement,
-                                             nsGenericHTMLElement,
-                                             nsIDOMHTMLLinkElement,
-                                             nsIStyleSheetLinkingElement,
-                                             Link)
+NS_IMPL_ADDREF_INHERITED(HTMLLinkElement, Element)
+NS_IMPL_RELEASE_INHERITED(HTMLLinkElement, Element)
+
+
+// QueryInterface implementation for HTMLLinkElement
+NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(HTMLLinkElement)
+  NS_INTERFACE_TABLE_INHERITED(HTMLLinkElement,
+                               nsIDOMHTMLLinkElement,
+                               nsIStyleSheetLinkingElement,
+                               Link)
+NS_INTERFACE_TABLE_TAIL_INHERITING(nsGenericHTMLElement)
+
 
 NS_IMPL_ELEMENT_CLONE(HTMLLinkElement)
 
 bool
 HTMLLinkElement::Disabled()
 {
   StyleSheet* ss = GetSheet();
   return ss && ss->Disabled();
--- a/dom/html/HTMLMapElement.cpp
+++ b/dom/html/HTMLMapElement.cpp
@@ -23,19 +23,24 @@ HTMLMapElement::HTMLMapElement(already_A
 
 NS_IMPL_CYCLE_COLLECTION_CLASS(HTMLMapElement)
 
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(HTMLMapElement,
                                                   nsGenericHTMLElement)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mAreas)
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
 
-NS_IMPL_ISUPPORTS_CYCLE_COLLECTION_INHERITED(HTMLMapElement,
-                                             nsGenericHTMLElement,
-                                             nsIDOMHTMLElement)
+NS_IMPL_ADDREF_INHERITED(HTMLMapElement, Element)
+NS_IMPL_RELEASE_INHERITED(HTMLMapElement, Element)
+
+
+// QueryInterface implementation for HTMLMapElement
+NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(HTMLMapElement)
+  NS_INTERFACE_TABLE_INHERITED(HTMLMapElement, nsIDOMHTMLElement)
+NS_INTERFACE_TABLE_TAIL_INHERITING(nsGenericHTMLElement)
 
 NS_IMPL_ELEMENT_CLONE(HTMLMapElement)
 
 
 nsIHTMLCollection*
 HTMLMapElement::Areas()
 {
   if (!mAreas) {
--- a/dom/html/HTMLObjectElement.cpp
+++ b/dom/html/HTMLObjectElement.cpp
@@ -91,28 +91,32 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_
   nsObjectLoadingContent::Traverse(tmp, cb);
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
 
 NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(HTMLObjectElement,
                                                 nsGenericHTMLFormElement)
   NS_IMPL_CYCLE_COLLECTION_UNLINK(mValidity)
 NS_IMPL_CYCLE_COLLECTION_UNLINK_END
 
-NS_IMPL_ISUPPORTS_CYCLE_COLLECTION_INHERITED(HTMLObjectElement,
-                                             nsGenericHTMLFormElement,
-                                             nsIDOMHTMLObjectElement,
-                                             imgINotificationObserver,
-                                             nsIRequestObserver,
-                                             nsIStreamListener,
-                                             nsIFrameLoaderOwner,
-                                             nsIObjectLoadingContent,
-                                             nsIImageLoadingContent,
-                                             imgIOnloadBlocker,
-                                             nsIChannelEventSink,
-                                             nsIConstraintValidation)
+NS_IMPL_ADDREF_INHERITED(HTMLObjectElement, Element)
+NS_IMPL_RELEASE_INHERITED(HTMLObjectElement, Element)
+
+NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(HTMLObjectElement)
+  NS_INTERFACE_TABLE_INHERITED(HTMLObjectElement,
+                               nsIDOMHTMLObjectElement,
+                               imgINotificationObserver,
+                               nsIRequestObserver,
+                               nsIStreamListener,
+                               nsIFrameLoaderOwner,
+                               nsIObjectLoadingContent,
+                               nsIImageLoadingContent,
+                               imgIOnloadBlocker,
+                               nsIChannelEventSink,
+                               nsIConstraintValidation)
+NS_INTERFACE_TABLE_TAIL_INHERITING(nsGenericHTMLFormElement)
 
 NS_IMPL_ELEMENT_CLONE(HTMLObjectElement)
 
 #ifdef XP_MACOSX
 
 static nsIWidget* GetWidget(Element* aElement)
 {
   return nsContentUtils::WidgetForDocument(aElement->OwnerDoc());
--- a/dom/html/HTMLSelectElement.cpp
+++ b/dom/html/HTMLSelectElement.cpp
@@ -160,20 +160,25 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mSelectedOptions)
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
 NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(HTMLSelectElement,
                                                 nsGenericHTMLFormElementWithState)
   NS_IMPL_CYCLE_COLLECTION_UNLINK(mValidity)
   NS_IMPL_CYCLE_COLLECTION_UNLINK(mSelectedOptions)
 NS_IMPL_CYCLE_COLLECTION_UNLINK_END
 
-NS_IMPL_ISUPPORTS_CYCLE_COLLECTION_INHERITED(HTMLSelectElement,
-                                             nsGenericHTMLFormElementWithState,
-                                             nsIDOMHTMLSelectElement,
-                                             nsIConstraintValidation)
+NS_IMPL_ADDREF_INHERITED(HTMLSelectElement, Element)
+NS_IMPL_RELEASE_INHERITED(HTMLSelectElement, Element)
+
+// QueryInterface implementation for HTMLSelectElement
+NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(HTMLSelectElement)
+  NS_INTERFACE_TABLE_INHERITED(HTMLSelectElement,
+                               nsIDOMHTMLSelectElement,
+                               nsIConstraintValidation)
+NS_INTERFACE_TABLE_TAIL_INHERITING(nsGenericHTMLFormElementWithState)
 
 
 // nsIDOMHTMLSelectElement
 
 
 NS_IMPL_ELEMENT_CLONE(HTMLSelectElement)
 
 void
--- a/dom/html/HTMLStyleElement.cpp
+++ b/dom/html/HTMLStyleElement.cpp
@@ -36,20 +36,26 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_
   tmp->nsStyleLinkElement::Traverse(cb);
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
 
 NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(HTMLStyleElement,
                                                 nsGenericHTMLElement)
   tmp->nsStyleLinkElement::Unlink();
 NS_IMPL_CYCLE_COLLECTION_UNLINK_END
 
-NS_IMPL_ISUPPORTS_CYCLE_COLLECTION_INHERITED(HTMLStyleElement,
-                                             nsGenericHTMLElement,
-                                             nsIStyleSheetLinkingElement,
-                                             nsIMutationObserver)
+NS_IMPL_ADDREF_INHERITED(HTMLStyleElement, Element)
+NS_IMPL_RELEASE_INHERITED(HTMLStyleElement, Element)
+
+
+// QueryInterface implementation for HTMLStyleElement
+NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(HTMLStyleElement)
+  NS_INTERFACE_TABLE_INHERITED(HTMLStyleElement,
+                               nsIStyleSheetLinkingElement,
+                               nsIMutationObserver)
+NS_INTERFACE_TABLE_TAIL_INHERITING(nsGenericHTMLElement)
 
 NS_IMPL_ELEMENT_CLONE(HTMLStyleElement)
 
 
 bool
 HTMLStyleElement::Disabled()
 {
   StyleSheet* ss = GetSheet();
--- a/dom/html/HTMLTextAreaElement.cpp
+++ b/dom/html/HTMLTextAreaElement.cpp
@@ -79,23 +79,30 @@ HTMLTextAreaElement::HTMLTextAreaElement
 
 
 NS_IMPL_CYCLE_COLLECTION_INHERITED(HTMLTextAreaElement,
                                    nsGenericHTMLFormElementWithState,
                                    mValidity,
                                    mControllers,
                                    mState)
 
-NS_IMPL_ISUPPORTS_CYCLE_COLLECTION_INHERITED(HTMLTextAreaElement,
-                                             nsGenericHTMLFormElementWithState,
-                                             nsIDOMHTMLTextAreaElement,
-                                             nsITextControlElement,
-                                             nsIDOMNSEditableElement,
-                                             nsIMutationObserver,
-                                             nsIConstraintValidation)
+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_INHERITED(HTMLTextAreaElement,
+                               nsIDOMHTMLTextAreaElement,
+                               nsITextControlElement,
+                               nsIDOMNSEditableElement,
+                               nsIMutationObserver,
+                               nsIConstraintValidation)
+NS_INTERFACE_TABLE_TAIL_INHERITING(nsGenericHTMLFormElementWithState)
+
 
 // nsIDOMHTMLTextAreaElement
 
 nsresult
 HTMLTextAreaElement::Clone(mozilla::dom::NodeInfo *aNodeInfo, nsINode **aResult,
                            bool aPreallocateChildren) const
 {
   *aResult = nullptr;
--- a/dom/html/ImageDocument.cpp
+++ b/dom/html/ImageDocument.cpp
@@ -160,21 +160,23 @@ ImageDocument::ImageDocument()
 ImageDocument::~ImageDocument()
 {
 }
 
 
 NS_IMPL_CYCLE_COLLECTION_INHERITED(ImageDocument, MediaDocument,
                                    mImageContent)
 
-NS_IMPL_ISUPPORTS_CYCLE_COLLECTION_INHERITED(ImageDocument,
-                                             MediaDocument,
-                                             nsIImageDocument,
-                                             imgINotificationObserver,
-                                             nsIDOMEventListener)
+NS_IMPL_ADDREF_INHERITED(ImageDocument, MediaDocument)
+NS_IMPL_RELEASE_INHERITED(ImageDocument, MediaDocument)
+
+NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(ImageDocument)
+  NS_INTERFACE_TABLE_INHERITED(ImageDocument, nsIImageDocument,
+                               imgINotificationObserver, nsIDOMEventListener)
+NS_INTERFACE_TABLE_TAIL_INHERITING(MediaDocument)
 
 
 nsresult
 ImageDocument::Init()
 {
   nsresult rv = MediaDocument::Init();
   NS_ENSURE_SUCCESS(rv, rv);
 
--- a/dom/html/PluginDocument.cpp
+++ b/dom/html/PluginDocument.cpp
@@ -105,19 +105,22 @@ PluginDocument::PluginDocument()
 {}
 
 PluginDocument::~PluginDocument() = default;
 
 
 NS_IMPL_CYCLE_COLLECTION_INHERITED(PluginDocument, MediaDocument,
                                    mPluginContent)
 
-NS_IMPL_ISUPPORTS_CYCLE_COLLECTION_INHERITED(PluginDocument,
-                                             MediaDocument,
-                                             nsIPluginDocument)
+NS_IMPL_ADDREF_INHERITED(PluginDocument, MediaDocument)
+NS_IMPL_RELEASE_INHERITED(PluginDocument, MediaDocument)
+
+NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(PluginDocument)
+  NS_INTERFACE_TABLE_INHERITED(PluginDocument, nsIPluginDocument)
+NS_INTERFACE_TABLE_TAIL_INHERITING(MediaDocument)
 
 void
 PluginDocument::SetScriptGlobalObject(nsIScriptGlobalObject* aScriptGlobalObject)
 {
   // Set the script global object on the superclass before doing
   // anything that might require it....
   MediaDocument::SetScriptGlobalObject(aScriptGlobalObject);
 
--- a/dom/html/nsGenericHTMLFrameElement.cpp
+++ b/dom/html/nsGenericHTMLFrameElement.cpp
@@ -43,22 +43,25 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_IN
     tmp->mFrameLoader->Destroy();
   }
 
   NS_IMPL_CYCLE_COLLECTION_UNLINK(mFrameLoader)
   NS_IMPL_CYCLE_COLLECTION_UNLINK(mOpenerWindow)
   NS_IMPL_CYCLE_COLLECTION_UNLINK(mBrowserElementAPI)
 NS_IMPL_CYCLE_COLLECTION_UNLINK_END
 
-NS_IMPL_ISUPPORTS_CYCLE_COLLECTION_INHERITED(nsGenericHTMLFrameElement,
-                                             nsGenericHTMLElement,
-                                             nsIFrameLoaderOwner,
-                                             nsIDOMMozBrowserFrame,
-                                             nsIMozBrowserFrame)
+NS_IMPL_ADDREF_INHERITED(nsGenericHTMLFrameElement, nsGenericHTMLElement)
+NS_IMPL_RELEASE_INHERITED(nsGenericHTMLFrameElement, nsGenericHTMLElement)
 
+NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(nsGenericHTMLFrameElement)
+  NS_INTERFACE_TABLE_INHERITED(nsGenericHTMLFrameElement,
+                               nsIFrameLoaderOwner,
+                               nsIDOMMozBrowserFrame,
+                               nsIMozBrowserFrame)
+NS_INTERFACE_TABLE_TAIL_INHERITING(nsGenericHTMLElement)
 NS_IMPL_BOOL_ATTR(nsGenericHTMLFrameElement, Mozbrowser, mozbrowser)
 
 int32_t
 nsGenericHTMLFrameElement::TabIndexDefault()
 {
   return 0;
 }
 
--- a/dom/html/nsHTMLContentSink.cpp
+++ b/dom/html/nsHTMLContentSink.cpp
@@ -680,20 +680,25 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_END
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(HTMLContentSink,
                                                   nsContentSink)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mHTMLDocument)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mRoot)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mBody)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mHead)
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
 
-NS_IMPL_ISUPPORTS_CYCLE_COLLECTION_INHERITED(HTMLContentSink,
-                                             nsContentSink,
-                                             nsIContentSink,
-                                             nsIHTMLContentSink)
+NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(HTMLContentSink)
+  NS_INTERFACE_TABLE_BEGIN
+    NS_INTERFACE_TABLE_ENTRY(HTMLContentSink, nsIContentSink)
+    NS_INTERFACE_TABLE_ENTRY(HTMLContentSink, nsIHTMLContentSink)
+  NS_INTERFACE_TABLE_END
+NS_INTERFACE_TABLE_TAIL_INHERITING(nsContentSink)
+
+NS_IMPL_ADDREF_INHERITED(HTMLContentSink, nsContentSink)
+NS_IMPL_RELEASE_INHERITED(HTMLContentSink, nsContentSink)
 
 nsresult
 HTMLContentSink::Init(nsIDocument* aDoc,
                       nsIURI* aURI,
                       nsISupports* aContainer,
                       nsIChannel* aChannel)
 {
   NS_ENSURE_TRUE(aContainer, NS_ERROR_NULL_POINTER);
--- a/dom/html/nsHTMLDocument.cpp
+++ b/dom/html/nsHTMLDocument.cpp
@@ -201,20 +201,24 @@ NS_IMPL_CYCLE_COLLECTION_INHERITED(nsHTM
                                    mEmbeds,
                                    mLinks,
                                    mAnchors,
                                    mScripts,
                                    mForms,
                                    mWyciwygChannel,
                                    mMidasCommandManager)
 
-NS_IMPL_ISUPPORTS_CYCLE_COLLECTION_INHERITED(nsHTMLDocument,
-                                             nsDocument,
-                                             nsIHTMLDocument,
-                                             nsIDOMHTMLDocument)
+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_INHERITED(nsHTMLDocument, nsIHTMLDocument,
+                               nsIDOMHTMLDocument)
+NS_INTERFACE_TABLE_TAIL_INHERITING(nsDocument)
 
 JSObject*
 nsHTMLDocument::WrapNode(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
 {
   return HTMLDocumentBinding::Wrap(aCx, this, aGivenProto);
 }
 
 nsresult
--- a/dom/svg/SVGAElement.cpp
+++ b/dom/svg/SVGAElement.cpp
@@ -40,16 +40,18 @@ nsSVGElement::StringInfo SVGAElement::sS
 
 NS_INTERFACE_MAP_BEGIN(SVGAElement)
   NS_INTERFACE_MAP_ENTRY(nsIDOMNode)
   NS_INTERFACE_MAP_ENTRY(nsIDOMElement)
   NS_INTERFACE_MAP_ENTRY(nsIDOMSVGElement)
   NS_INTERFACE_MAP_ENTRY(Link)
 NS_INTERFACE_MAP_END_INHERITING(SVGAElementBase)
 
+NS_IMPL_ADDREF_INHERITED(SVGAElement, SVGAElementBase)
+NS_IMPL_RELEASE_INHERITED(SVGAElement, SVGAElementBase)
 
 //----------------------------------------------------------------------
 // Implementation
 
 SVGAElement::SVGAElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo)
   : SVGAElementBase(aNodeInfo)
   , Link(this)
 {
--- a/dom/svg/SVGMPathElement.cpp
+++ b/dom/svg/SVGMPathElement.cpp
@@ -42,22 +42,24 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_END
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(SVGMPathElement,
                                                   SVGMPathElementBase)
   tmp->mHrefTarget.Traverse(&cb);
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
 
 //----------------------------------------------------------------------
 // nsISupports methods
 
-NS_IMPL_ISUPPORTS_CYCLE_COLLECTION_INHERITED(SVGMPathElement,
-                                             SVGMPathElementBase,
-                                             nsIDOMNode,
-                                             nsIDOMElement,
-                                             nsIDOMSVGElement,
-                                             nsIMutationObserver)
+NS_IMPL_ADDREF_INHERITED(SVGMPathElement,SVGMPathElementBase)
+NS_IMPL_RELEASE_INHERITED(SVGMPathElement,SVGMPathElementBase)
+
+NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(SVGMPathElement)
+  NS_INTERFACE_TABLE_INHERITED(SVGMPathElement, nsIDOMNode, nsIDOMElement,
+                               nsIDOMSVGElement,
+                               nsIMutationObserver)
+NS_INTERFACE_TABLE_TAIL_INHERITING(SVGMPathElementBase)
 
 // Constructor
 SVGMPathElement::SVGMPathElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo)
   : SVGMPathElementBase(aNodeInfo),
     mHrefTarget(this)
 {
 }
 
--- a/dom/svg/SVGSVGElement.cpp
+++ b/dom/svg/SVGSVGElement.cpp
@@ -115,21 +115,23 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_IN
 NS_IMPL_CYCLE_COLLECTION_UNLINK_END
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(SVGSVGElement,
                                                   SVGSVGElementBase)
   if (tmp->mTimedDocumentRoot) {
     tmp->mTimedDocumentRoot->Traverse(&cb);
   }
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
 
-NS_IMPL_ISUPPORTS_CYCLE_COLLECTION_INHERITED(SVGSVGElement,
-                                             SVGSVGElementBase,
-                                             nsIDOMNode,
-                                             nsIDOMElement,
-                                             nsIDOMSVGElement)
+NS_IMPL_ADDREF_INHERITED(SVGSVGElement,SVGSVGElementBase)
+NS_IMPL_RELEASE_INHERITED(SVGSVGElement,SVGSVGElementBase)
+
+NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(SVGSVGElement)
+  NS_INTERFACE_TABLE_INHERITED(SVGSVGElement, nsIDOMNode, nsIDOMElement,
+                               nsIDOMSVGElement)
+NS_INTERFACE_TABLE_TAIL_INHERITING(SVGSVGElementBase)
 
 SVGView::SVGView()
 {
   mZoomAndPan.Init(SVGSVGElement::ZOOMANDPAN,
                    SVG_ZOOMANDPAN_MAGNIFY);
   mViewBox.Init();
   mPreserveAspectRatio.Init();
 }
--- a/dom/svg/SVGStyleElement.cpp
+++ b/dom/svg/SVGStyleElement.cpp
@@ -18,20 +18,24 @@ JSObject*
 SVGStyleElement::WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto)
 {
   return SVGStyleElementBinding::Wrap(aCx, this, aGivenProto);
 }
 
 //----------------------------------------------------------------------
 // nsISupports methods
 
-NS_IMPL_ISUPPORTS_CYCLE_COLLECTION_INHERITED(SVGStyleElement,
-                                             SVGStyleElementBase,
-                                             nsIStyleSheetLinkingElement,
-                                             nsIMutationObserver)
+NS_IMPL_ADDREF_INHERITED(SVGStyleElement, SVGStyleElementBase)
+NS_IMPL_RELEASE_INHERITED(SVGStyleElement, SVGStyleElementBase)
+
+NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(SVGStyleElement)
+  NS_INTERFACE_TABLE_INHERITED(SVGStyleElement,
+                               nsIStyleSheetLinkingElement,
+                               nsIMutationObserver)
+NS_INTERFACE_TABLE_TAIL_INHERITING(SVGStyleElementBase)
 
 NS_IMPL_CYCLE_COLLECTION_CLASS(SVGStyleElement)
 
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(SVGStyleElement,
                                                   SVGStyleElementBase)
   tmp->nsStyleLinkElement::Traverse(cb);
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
 
--- a/dom/svg/SVGUseElement.cpp
+++ b/dom/svg/SVGUseElement.cpp
@@ -59,19 +59,22 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_IN
   tmp->UnlinkSource();
 NS_IMPL_CYCLE_COLLECTION_UNLINK_END
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(SVGUseElement,
                                                   SVGUseElementBase)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mOriginal)
   tmp->mSource.Traverse(&cb);
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
 
-NS_IMPL_ISUPPORTS_CYCLE_COLLECTION_INHERITED(SVGUseElement,
-                                             SVGUseElementBase,
-                                             nsIMutationObserver)
+NS_IMPL_ADDREF_INHERITED(SVGUseElement,SVGUseElementBase)
+NS_IMPL_RELEASE_INHERITED(SVGUseElement,SVGUseElementBase)
+
+NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(SVGUseElement)
+  NS_INTERFACE_TABLE_INHERITED(SVGUseElement, nsIMutationObserver)
+NS_INTERFACE_TABLE_TAIL_INHERITING(SVGUseElementBase)
 
 //----------------------------------------------------------------------
 // Implementation
 
 SVGUseElement::SVGUseElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo)
   : SVGUseElementBase(aNodeInfo), mSource(this)
 {
 }
--- a/dom/xml/XMLStylesheetProcessingInstruction.cpp
+++ b/dom/xml/XMLStylesheetProcessingInstruction.cpp
@@ -9,21 +9,26 @@
 #include "nsContentUtils.h"
 #include "nsNetUtil.h"
 
 namespace mozilla {
 namespace dom {
 
 // nsISupports implementation
 
-NS_IMPL_ISUPPORTS_CYCLE_COLLECTION_INHERITED(XMLStylesheetProcessingInstruction,
-                                             ProcessingInstruction,
-                                             nsIDOMNode,
-                                             nsIDOMProcessingInstruction,
-                                             nsIStyleSheetLinkingElement)
+NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(XMLStylesheetProcessingInstruction)
+  NS_INTERFACE_TABLE_INHERITED(XMLStylesheetProcessingInstruction, nsIDOMNode,
+                               nsIDOMProcessingInstruction,
+                               nsIStyleSheetLinkingElement)
+NS_INTERFACE_TABLE_TAIL_INHERITING(ProcessingInstruction)
+
+NS_IMPL_ADDREF_INHERITED(XMLStylesheetProcessingInstruction,
+                         ProcessingInstruction)
+NS_IMPL_RELEASE_INHERITED(XMLStylesheetProcessingInstruction,
+                          ProcessingInstruction)
 
 NS_IMPL_CYCLE_COLLECTION_CLASS(XMLStylesheetProcessingInstruction)
 
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(XMLStylesheetProcessingInstruction,
                                                   ProcessingInstruction)
   tmp->nsStyleLinkElement::Traverse(cb);
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
 
--- a/dom/xul/XULDocument.cpp
+++ b/dom/xul/XULDocument.cpp
@@ -327,23 +327,26 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_IN
     delete tmp->mTemplateBuilderTable;
     tmp->mTemplateBuilderTable = nullptr;
 
     NS_IMPL_CYCLE_COLLECTION_UNLINK(mCommandDispatcher)
     NS_IMPL_CYCLE_COLLECTION_UNLINK(mLocalStore)
     //XXX We should probably unlink all the objects we traverse.
 NS_IMPL_CYCLE_COLLECTION_UNLINK_END
 
-NS_IMPL_ISUPPORTS_CYCLE_COLLECTION_INHERITED(XULDocument,
-                                             XMLDocument,
-                                             nsIXULDocument,
-                                             nsIDOMXULDocument,
-                                             nsIStreamLoaderObserver,
-                                             nsICSSLoaderObserver,
-                                             nsIOffThreadScriptReceiver)
+NS_IMPL_ADDREF_INHERITED(XULDocument, XMLDocument)
+NS_IMPL_RELEASE_INHERITED(XULDocument, XMLDocument)
+
+
+// QueryInterface implementation for XULDocument
+NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(XULDocument)
+    NS_INTERFACE_TABLE_INHERITED(XULDocument, nsIXULDocument,
+                                 nsIDOMXULDocument, nsIStreamLoaderObserver,
+                                 nsICSSLoaderObserver, nsIOffThreadScriptReceiver)
+NS_INTERFACE_TABLE_TAIL_INHERITING(XMLDocument)
 
 
 //----------------------------------------------------------------------
 //
 // nsIDocument interface
 //
 
 void
--- a/editor/libeditor/HTMLEditRules.cpp
+++ b/editor/libeditor/HTMLEditRules.cpp
@@ -240,19 +240,21 @@ HTMLEditRules::~HTMLEditRules()
   // ~HTMLEditor, in which case we will get a null pointer here
   // which we ignore.  But this allows us to add the ability to
   // switch rule sets on the fly if we want.
   if (mHTMLEditor) {
     mHTMLEditor->RemoveEditActionListener(this);
   }
 }
 
-NS_IMPL_ISUPPORTS_CYCLE_COLLECTION_INHERITED(HTMLEditRules,
-                                             TextEditRules,
-                                             nsIEditActionListener)
+NS_IMPL_ADDREF_INHERITED(HTMLEditRules, TextEditRules)
+NS_IMPL_RELEASE_INHERITED(HTMLEditRules, TextEditRules)
+NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(HTMLEditRules)
+  NS_INTERFACE_TABLE_INHERITED(HTMLEditRules, nsIEditActionListener)
+NS_INTERFACE_TABLE_TAIL_INHERITING(TextEditRules)
 
 NS_IMPL_CYCLE_COLLECTION_INHERITED(HTMLEditRules, TextEditRules,
                                    mDocChangeRange, mUtilRange, mNewBlock,
                                    mRangeItem)
 
 NS_IMETHODIMP
 HTMLEditRules::Init(TextEditor* aTextEditor)
 {
--- a/parser/html/nsHtml5TreeOpExecutor.cpp
+++ b/parser/html/nsHtml5TreeOpExecutor.cpp
@@ -32,19 +32,24 @@
 #include "mozilla/Preferences.h"
 #include "nsIHTMLDocument.h"
 #include "nsIViewSourceChannel.h"
 #include "xpcpublic.h"
 #include "mozilla/IdleTaskRunner.h"
 
 using namespace mozilla;
 
-NS_IMPL_ISUPPORTS_CYCLE_COLLECTION_INHERITED(nsHtml5TreeOpExecutor,
-                                             nsHtml5DocumentBuilder,
-                                             nsIContentSink)
+NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(nsHtml5TreeOpExecutor)
+  NS_INTERFACE_TABLE_INHERITED(nsHtml5TreeOpExecutor,
+                               nsIContentSink)
+NS_INTERFACE_TABLE_TAIL_INHERITING(nsHtml5DocumentBuilder)
+
+NS_IMPL_ADDREF_INHERITED(nsHtml5TreeOpExecutor, nsContentSink)
+
+NS_IMPL_RELEASE_INHERITED(nsHtml5TreeOpExecutor, nsContentSink)
 
 class nsHtml5ExecutorReflusher : public Runnable
 {
   private:
     RefPtr<nsHtml5TreeOpExecutor> mExecutor;
   public:
     explicit nsHtml5ExecutorReflusher(nsHtml5TreeOpExecutor* aExecutor)
       : mozilla::Runnable("nsHtml5ExecutorReflusher")