Bug 888685: SVGAnimatedRect shouldn't inherit nsISupports r=Ms2ger
authorDavid Zbarsky <dzbarsky@gmail.com>
Tue, 23 Jul 2013 01:34:17 -0700
changeset 151835 d673673d7ee2c646581ee60d59d33c5e24673bae
parent 151834 96d374c8f83369c6c9e1bc5b1c7c8c58d47b3ebd
child 151836 93937caf5d5731d6e55cddf52234bcfe6b4f4323
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: SVGAnimatedRect shouldn't inherit nsISupports r=Ms2ger
content/svg/content/src/SVGAnimatedRect.cpp
content/svg/content/src/SVGAnimatedRect.h
dom/bindings/Bindings.conf
--- a/content/svg/content/src/SVGAnimatedRect.cpp
+++ b/content/svg/content/src/SVGAnimatedRect.cpp
@@ -7,25 +7,20 @@
 #include "mozilla/dom/SVGAnimatedRectBinding.h"
 #include "nsSVGElement.h"
 #include "nsSVGViewBox.h"
 #include "SVGIRect.h"
 
 namespace mozilla {
 namespace dom {
 
-NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(SVGAnimatedRect)
-  NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
-  NS_INTERFACE_MAP_ENTRY(nsISupports)
-NS_INTERFACE_MAP_END
-
 NS_SVG_VAL_IMPL_CYCLE_COLLECTION_WRAPPERCACHED(SVGAnimatedRect, mSVGElement)
 
-NS_IMPL_CYCLE_COLLECTING_ADDREF(SVGAnimatedRect)
-NS_IMPL_CYCLE_COLLECTING_RELEASE(SVGAnimatedRect)
+NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(SVGAnimatedRect, AddRef)
+NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(SVGAnimatedRect, Release)
 
 SVGAnimatedRect::SVGAnimatedRect(nsSVGViewBox* aVal, nsSVGElement* aSVGElement)
   : mVal(aVal)
   , mSVGElement(aSVGElement)
 {
   SetIsDOMBinding();
 }
 
--- a/content/svg/content/src/SVGAnimatedRect.h
+++ b/content/svg/content/src/SVGAnimatedRect.h
@@ -13,22 +13,21 @@
 #include "nsWrapperCache.h"
 
 class nsSVGElement;
 class nsSVGViewBox;
 
 namespace mozilla {
 namespace dom {
 
-class SVGAnimatedRect MOZ_FINAL : public nsISupports,
-                                  public nsWrapperCache
+class SVGAnimatedRect MOZ_FINAL : public nsWrapperCache
 {
 public:
-  NS_DECL_CYCLE_COLLECTING_ISUPPORTS
-  NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(SVGAnimatedRect)
+  NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(SVGAnimatedRect)
+  NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(SVGAnimatedRect)
 
   SVGAnimatedRect(nsSVGViewBox* aVal, nsSVGElement* aSVGElement);
 
   virtual ~SVGAnimatedRect();
 
   nsSVGElement* GetParentObject() const
   {
     return mSVGElement;
--- a/dom/bindings/Bindings.conf
+++ b/dom/bindings/Bindings.conf
@@ -883,16 +883,20 @@ DOMInterfaces = {
     'headerFile': 'DOMSVGAnimatedNumberList.h'
 },
 
 'SVGAnimatedPreserveAspectRatio': {
     'nativeType': 'mozilla::dom::DOMSVGAnimatedPreserveAspectRatio',
     'headerFile': 'SVGAnimatedPreserveAspectRatio.h'
 },
 
+'SVGAnimatedRect' : {
+    'nativeOwnership': 'refcounted'
+},
+
 'SVGAnimatedTransformList': {
     'nativeOwnership': 'refcounted',
 },
 
 'SVGAnimationElement': {
     'resultNotAddRefed': ['targetElement'],
     'concrete': False
 },