Bug 1184065, properly support WrapperCache on DestinationInsertionPointList, r=wchen
authorOlli Pettay <Olli.Pettay@helsinki.fi>
Sat, 18 Jul 2015 01:16:43 +0300
changeset 253593 945f8c56a39dd4064f90b6a35fd483a9bb6982dd
parent 253592 e65e02c8654495c3a1712ea0e789e96561a23855
child 253594 71541c64c605ddf0463ab356c837dfc4e5e203cb
push id29072
push usercbook@mozilla.com
push dateMon, 20 Jul 2015 09:36:58 +0000
treeherdermozilla-central@5df788c56ae7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerswchen
bugs1184065
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 1184065, properly support WrapperCache on DestinationInsertionPointList, r=wchen
dom/base/Element.cpp
dom/base/Element.h
--- a/dom/base/Element.cpp
+++ b/dom/base/Element.cpp
@@ -1054,20 +1054,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
@@ -1296,17 +1296,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) override;
   virtual int32_t IndexOf(nsIContent* aContent) override;
   virtual nsINode* GetParentObject() override { return mParent; }