Bug 1184065 - Properly support WrapperCache on DestinationInsertionPointList. r=wchen, a=2.2+
authorOlli Pettay <Olli.Pettay@helsinki.fi>
Sat, 18 Jul 2015 01:16:43 +0300
changeset 238742 1d69c96a051780a5af9cbc81a79e22b0e5a3c897
parent 238741 f4eaa0dd76216ddc38f5e0ee23d223423570cab5
child 238743 f3b9f68f9c9074bf49d6092ceca16cec317930d1
push id755
push userryanvm@gmail.com
push dateMon, 27 Jul 2015 23:59:00 +0000
treeherdermozilla-b2g37_v2_2@1ba4654d04a9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerswchen, 2.2
bugs1184065
milestone37.0
Bug 1184065 - Properly support WrapperCache on DestinationInsertionPointList. r=wchen, a=2.2+
dom/base/Element.cpp
dom/base/Element.h
--- a/dom/base/Element.cpp
+++ b/dom/base/Element.cpp
@@ -1024,20 +1024,22 @@ Element::CreateShadowRoot(ErrorResult& a
     if (shell) {
       shell->CreateFramesFor(destroyedFramesFor);
     }
   }
 
   return shadowRoot.forget();
 }
 
-NS_IMPL_CYCLE_COLLECTION(DestinationInsertionPointList, mParent, mDestinationPoints)
+NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(DestinationInsertionPointList, mParent,
+                                      mDestinationPoints)
 
 NS_INTERFACE_TABLE_HEAD(DestinationInsertionPointList)
-  NS_INTERFACE_TABLE(DestinationInsertionPointList, nsINodeList)
+  NS_WRAPPERCACHE_INTERFACE_TABLE_ENTRY
+  NS_INTERFACE_TABLE(DestinationInsertionPointList, nsINodeList, nsIDOMNodeList)
   NS_INTERFACE_TABLE_TO_MAP_SEGUE_CYCLE_COLLECTION(DestinationInsertionPointList)
 NS_INTERFACE_MAP_END
 
 NS_IMPL_CYCLE_COLLECTING_ADDREF(DestinationInsertionPointList)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(DestinationInsertionPointList)
 
 DestinationInsertionPointList::DestinationInsertionPointList(Element* aElement)
   : mParent(aElement)
--- a/dom/base/Element.h
+++ b/dom/base/Element.h
@@ -1303,17 +1303,17 @@ private:
 };
 
 class DestinationInsertionPointList : public nsINodeList
 {
 public:
   explicit DestinationInsertionPointList(Element* aElement);
 
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
-  NS_DECL_CYCLE_COLLECTION_CLASS(DestinationInsertionPointList)
+  NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(DestinationInsertionPointList)
 
   // nsIDOMNodeList
   NS_DECL_NSIDOMNODELIST
 
   // nsINodeList
   virtual nsIContent* Item(uint32_t aIndex) MOZ_OVERRIDE;
   virtual int32_t IndexOf(nsIContent* aContent) MOZ_OVERRIDE;
   virtual nsINode* GetParentObject() MOZ_OVERRIDE { return mParent; }