Bug 888685: SVGAnimatedLengthList shouldn't inherit nsISupports r=Ms2ger
authorDavid Zbarsky <dzbarsky@gmail.com>
Tue, 23 Jul 2013 01:34:18 -0700
changeset 151836 93937caf5d5731d6e55cddf52234bcfe6b4f4323
parent 151835 d673673d7ee2c646581ee60d59d33c5e24673bae
child 151837 9fc53053c489f95d18aac1e418844bafbce8a9a6
push id2859
push userakeybl@mozilla.com
push dateMon, 16 Sep 2013 19:14:59 +0000
treeherdermozilla-beta@87d3c51cd2bf [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersMs2ger
bugs888685
milestone25.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 888685: SVGAnimatedLengthList shouldn't inherit nsISupports r=Ms2ger
content/svg/content/src/DOMSVGAnimatedLengthList.cpp
content/svg/content/src/DOMSVGAnimatedLengthList.h
dom/bindings/Bindings.conf
--- a/content/svg/content/src/DOMSVGAnimatedLengthList.cpp
+++ b/content/svg/content/src/DOMSVGAnimatedLengthList.cpp
@@ -22,23 +22,18 @@ SVGAnimatedLengthListTearoffTable()
 {
   static nsSVGAttrTearoffTable<SVGAnimatedLengthList, DOMSVGAnimatedLengthList>
     sSVGAnimatedLengthListTearoffTable;
   return sSVGAnimatedLengthListTearoffTable;
 }
 
 NS_SVG_VAL_IMPL_CYCLE_COLLECTION_WRAPPERCACHED(DOMSVGAnimatedLengthList, mElement)
 
-NS_IMPL_CYCLE_COLLECTING_ADDREF(DOMSVGAnimatedLengthList)
-NS_IMPL_CYCLE_COLLECTING_RELEASE(DOMSVGAnimatedLengthList)
-
-NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(DOMSVGAnimatedLengthList)
-  NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
-  NS_INTERFACE_MAP_ENTRY(nsISupports)
-NS_INTERFACE_MAP_END
+NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(DOMSVGAnimatedLengthList, AddRef)
+NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(DOMSVGAnimatedLengthList, Release)
 
 JSObject*
 DOMSVGAnimatedLengthList::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aScope)
 {
   return dom::SVGAnimatedLengthListBinding::Wrap(aCx, aScope, this);
 }
 
 already_AddRefed<DOMSVGLengthList>
--- a/content/svg/content/src/DOMSVGAnimatedLengthList.h
+++ b/content/svg/content/src/DOMSVGAnimatedLengthList.h
@@ -98,24 +98,23 @@ class DOMSVGLengthList;
  *
  *      .----<!----.                .----<!----.        .----<!----.
  *      |          |                |          |        |          |
  *   element ~> DOMSVGAnimatedLengthList ~> DOMSVGLengthList ~> DOMSVGLength
  *
  * One drawback of this design is that objects must look up their parent
  * chain to find their element, but that overhead is relatively small.
  */
-class DOMSVGAnimatedLengthList MOZ_FINAL : public nsISupports,
-                                           public nsWrapperCache
+class DOMSVGAnimatedLengthList MOZ_FINAL : public nsWrapperCache
 {
   friend class DOMSVGLengthList;
 
 public:
-  NS_DECL_CYCLE_COLLECTING_ISUPPORTS
-  NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(DOMSVGAnimatedLengthList)
+  NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(DOMSVGAnimatedLengthList)
+  NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(DOMSVGAnimatedLengthList)
 
   /**
    * Factory method to create and return a DOMSVGAnimatedLengthList wrapper
    * for a given internal SVGAnimatedLengthList object. The factory takes care
    * of caching the object that it returns so that the same object can be
    * returned for the given SVGAnimatedLengthList each time it is requested.
    * The cached object is only removed from the cache when it is destroyed due
    * to there being no more references to it or to any of its descendant
--- a/dom/bindings/Bindings.conf
+++ b/dom/bindings/Bindings.conf
@@ -870,17 +870,18 @@ DOMInterfaces = {
 },
 
 'SVGAnimatedLength' : {
     'nativeOwnership': 'refcounted'
 },
 
 'SVGAnimatedLengthList': {
     'nativeType': 'mozilla::DOMSVGAnimatedLengthList',
-    'headerFile': 'DOMSVGAnimatedLengthList.h'
+    'headerFile': 'DOMSVGAnimatedLengthList.h',
+    'nativeOwnership': 'refcounted',
 },
 
 'SVGAnimatedNumberList': {
     'nativeType': 'mozilla::DOMSVGAnimatedNumberList',
     'headerFile': 'DOMSVGAnimatedNumberList.h'
 },
 
 'SVGAnimatedPreserveAspectRatio': {