From 92998ad05e368c9be8b2a53f1f0cbe608be14069 Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Wed, 11 Jul 2012 00:03:55 -0400 Subject: [PATCH] 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 (more layout parts); r=roc --- layout/generic/nsTextFrameThebes.cpp | 2 +- layout/xul/base/src/nsMenuFrame.cpp | 3 ++- layout/xul/base/src/nsProgressMeterFrame.cpp | 3 ++- layout/xul/base/src/nsTextBoxFrame.cpp | 3 ++- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/layout/generic/nsTextFrameThebes.cpp b/layout/generic/nsTextFrameThebes.cpp index 748f6f0a4156..51356d560eb2 100644 --- a/layout/generic/nsTextFrameThebes.cpp +++ b/layout/generic/nsTextFrameThebes.cpp @@ -499,7 +499,7 @@ static FrameTextRunCache *gTextRuns = nsnull; /* * Cache textruns and expire them after 3*10 seconds of no use. */ -class FrameTextRunCache : public nsExpirationTracker { +class FrameTextRunCache MOZ_FINAL : public nsExpirationTracker { public: enum { TIMEOUT_SECONDS = 10 }; FrameTextRunCache() diff --git a/layout/xul/base/src/nsMenuFrame.cpp b/layout/xul/base/src/nsMenuFrame.cpp index c1fe0f255ddc..6fa78c670c33 100644 --- a/layout/xul/base/src/nsMenuFrame.cpp +++ b/layout/xul/base/src/nsMenuFrame.cpp @@ -41,6 +41,7 @@ #include "mozilla/Services.h" #include "mozilla/Preferences.h" #include "mozilla/LookAndFeel.h" +#include "mozilla/Attributes.h" using namespace mozilla; @@ -211,7 +212,7 @@ nsMenuFrame::InitMenuParent(nsIFrame* aParent) } } -class nsASyncMenuInitialization : public nsIReflowCallback +class nsASyncMenuInitialization MOZ_FINAL : public nsIReflowCallback { public: nsASyncMenuInitialization(nsIFrame* aFrame) diff --git a/layout/xul/base/src/nsProgressMeterFrame.cpp b/layout/xul/base/src/nsProgressMeterFrame.cpp index 1c73fbf93356..319b0cfe9785 100644 --- a/layout/xul/base/src/nsProgressMeterFrame.cpp +++ b/layout/xul/base/src/nsProgressMeterFrame.cpp @@ -20,6 +20,7 @@ #include "nsBoxLayoutState.h" #include "nsIReflowCallback.h" #include "nsContentUtils.h" +#include "mozilla/Attributes.h" // // NS_NewToolbarFrame // @@ -42,7 +43,7 @@ nsProgressMeterFrame :: ~nsProgressMeterFrame ( ) { } -class nsAsyncProgressMeterInit : public nsIReflowCallback +class nsAsyncProgressMeterInit MOZ_FINAL : public nsIReflowCallback { public: nsAsyncProgressMeterInit(nsIFrame* aFrame) : mWeakFrame(aFrame) {} diff --git a/layout/xul/base/src/nsTextBoxFrame.cpp b/layout/xul/base/src/nsTextBoxFrame.cpp index 718359abc18c..f98473259cbe 100644 --- a/layout/xul/base/src/nsTextBoxFrame.cpp +++ b/layout/xul/base/src/nsTextBoxFrame.cpp @@ -29,6 +29,7 @@ #include "nsBoxFrame.h" #include "mozilla/Preferences.h" #include "nsLayoutUtils.h" +#include "mozilla/Attributes.h" #ifdef IBMBIDI #include "nsBidiUtils.h" @@ -152,7 +153,7 @@ nsTextBoxFrame::InsertSeparatorBeforeAccessKey() return gInsertSeparatorBeforeAccessKey; } -class nsAsyncAccesskeyUpdate : public nsIReflowCallback +class nsAsyncAccesskeyUpdate MOZ_FINAL : public nsIReflowCallback { public: nsAsyncAccesskeyUpdate(nsIFrame* aFrame) : mWeakFrame(aFrame)