Bug 758992 - Make the classes which use the XPCOM nsISupports implementation macros final, to avoid the warning about deleting using a pointer to a base class with virtual functions and no virtual dtor (view parts); r=roc
authorEhsan Akhgari <ehsan@mozilla.com>
Mon, 18 Jun 2012 21:24:02 -0400
changeset 97023 4708cba2757d92dded4db298c696d8e341948009
parent 97022 9d826056332b34245f19a93a1a07281847711114
child 97024 97bbf868d76d1a48fcf017e13cfb00a82a27e571
push id22957
push usermh@glandium.org
push dateWed, 20 Jun 2012 08:54:19 +0000
treeherdermozilla-central@c3190d715044 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs758992
milestone16.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 758992 - Make the classes which use the XPCOM nsISupports implementation macros final, to avoid the warning about deleting using a pointer to a base class with virtual functions and no virtual dtor (view parts); r=roc
view/src/nsView.cpp
--- a/view/src/nsView.cpp
+++ b/view/src/nsView.cpp
@@ -6,32 +6,33 @@
 #include "nsView.h"
 #include "nsIWidget.h"
 #include "nsWidgetsCID.h"
 #include "nsViewManager.h"
 #include "nsGUIEvent.h"
 #include "nsIComponentManager.h"
 #include "nsGfxCIID.h"
 #include "nsIInterfaceRequestor.h"
+#include "mozilla/Attributes.h"
 
 //mmptemp
 
 static nsEventStatus HandleEvent(nsGUIEvent *aEvent);
 
 
 //#define SHOW_VIEW_BORDERS
 
 #define VIEW_WRAPPER_IID \
   { 0xbf4e1841, 0xe9ec, 0x47f2, \
     { 0xb4, 0x77, 0x0f, 0xf6, 0x0f, 0x5a, 0xac, 0xbd } }
 
 /**
  * nsISupports-derived helper class that allows to store and get a view
  */
-class ViewWrapper : public nsIInterfaceRequestor
+class ViewWrapper MOZ_FINAL : public nsIInterfaceRequestor
 {
   public:
     NS_DECLARE_STATIC_IID_ACCESSOR(VIEW_WRAPPER_IID)
     NS_DECL_ISUPPORTS
     NS_DECL_NSIINTERFACEREQUESTOR
 
     ViewWrapper(nsView* aView) : mView(aView) {}