Bug 1183901, properly support WrapperCache on DistributedContentList, r=wchen
authorOlli Pettay <Olli.Pettay@helsinki.fi>
Sat, 18 Jul 2015 01:15:44 +0300
changeset 285242 e65e02c8654495c3a1712ea0e789e96561a23855
parent 285241 60d045b1c1a6998471ace6c999d5cf0b38c9a02e
child 285243 945f8c56a39dd4064f90b6a35fd483a9bb6982dd
push id5067
push userraliiev@mozilla.com
push dateMon, 21 Sep 2015 14:04:52 +0000
treeherdermozilla-beta@14221ffe5b2f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerswchen
bugs1183901
milestone42.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 1183901, properly support WrapperCache on DistributedContentList, r=wchen
dom/html/HTMLContentElement.cpp
dom/html/HTMLContentElement.h
--- a/dom/html/HTMLContentElement.cpp
+++ b/dom/html/HTMLContentElement.cpp
@@ -292,20 +292,22 @@ HTMLContentElement::Match(nsIContent* aC
 
 already_AddRefed<DistributedContentList>
 HTMLContentElement::GetDistributedNodes()
 {
   nsRefPtr<DistributedContentList> list = new DistributedContentList(this);
   return list.forget();
 }
 
-NS_IMPL_CYCLE_COLLECTION(DistributedContentList, mParent, mDistributedNodes)
+NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(DistributedContentList, mParent,
+                                      mDistributedNodes)
 
 NS_INTERFACE_TABLE_HEAD(DistributedContentList)
-  NS_INTERFACE_TABLE(DistributedContentList, nsINodeList)
+  NS_WRAPPERCACHE_INTERFACE_TABLE_ENTRY
+  NS_INTERFACE_TABLE(DistributedContentList, nsINodeList, nsIDOMNodeList)
   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)
 
 DistributedContentList::DistributedContentList(HTMLContentElement* aHostElement)
   : mParent(aHostElement)
--- a/dom/html/HTMLContentElement.h
+++ b/dom/html/HTMLContentElement.h
@@ -97,17 +97,17 @@ protected:
 };
 
 class DistributedContentList : public nsINodeList
 {
 public:
   explicit DistributedContentList(HTMLContentElement* aHostElement);
 
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
-  NS_DECL_CYCLE_COLLECTION_CLASS(DistributedContentList)
+  NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(DistributedContentList)
 
   // nsIDOMNodeList
   NS_DECL_NSIDOMNODELIST
 
   // nsINodeList
   virtual nsIContent* Item(uint32_t aIndex) override;
   virtual int32_t IndexOf(nsIContent* aContent) override;
   virtual nsINode* GetParentObject() override { return mParent; }