Bug 1027251 - Fix or whitelist dangerous public destructors in layout/ - r=dbaron

This commit is contained in:
Benoit Jacob 2014-06-18 22:28:59 -04:00
parent dd18742280
commit 69358080cf
5 changed files with 16 additions and 2 deletions

View File

@ -47,6 +47,8 @@ enum LayerState {
};
class RefCountedRegion {
private:
~RefCountedRegion() {}
public:
NS_INLINE_DECL_REFCOUNTING(RefCountedRegion)

View File

@ -282,6 +282,10 @@ struct ComputedTiming
*/
struct ElementAnimation
{
protected:
virtual ~ElementAnimation() { }
public:
ElementAnimation()
: mIsRunningOnCompositor(false)
, mLastNotification(LAST_NOTIFICATION_NONE)
@ -291,7 +295,6 @@ struct ElementAnimation
// FIXME: If we succeed in moving transition-specific code to a type of
// AnimationEffect (as per the Web Animations API) we should remove these
// virtual methods.
virtual ~ElementAnimation() { }
virtual ElementPropertyTransition* AsTransition() { return nullptr; }
virtual const ElementPropertyTransition* AsTransition() const {
return nullptr;

View File

@ -933,6 +933,8 @@ BuiltinCounterStyle::GetInitialCounterText(CounterValue aOrdinal,
class DependentBuiltinCounterStyle MOZ_FINAL : public BuiltinCounterStyle
{
private:
~DependentBuiltinCounterStyle() {}
public:
DependentBuiltinCounterStyle(int32_t aStyle, CounterStyleManager* aManager)
: BuiltinCounterStyle(aStyle),
@ -978,6 +980,8 @@ DependentBuiltinCounterStyle::GetFallback()
class CustomCounterStyle MOZ_FINAL : public CounterStyle
{
private:
~CustomCounterStyle() {}
public:
CustomCounterStyle(CounterStyleManager* aManager,
nsCSSCounterStyleRule* aRule)

View File

@ -101,9 +101,10 @@ protected:
class CounterStyleManager MOZ_FINAL
{
private:
~CounterStyleManager();
public:
CounterStyleManager(nsPresContext* aPresContext);
~CounterStyleManager();
static void InitializeBuiltinCounterStyles();

View File

@ -83,8 +83,10 @@ struct URLValue {
URLValue(nsIURI* aURI, nsStringBuffer* aString, nsIURI* aReferrer,
nsIPrincipal* aOriginPrincipal);
protected:
~URLValue();
public:
bool operator==(const URLValue& aOther) const;
// URIEquals only compares URIs and principals (unlike operator==, which
@ -124,8 +126,10 @@ struct ImageValue : public URLValue {
// aString must not be null.
ImageValue(nsIURI* aURI, nsStringBuffer* aString, nsIURI* aReferrer,
nsIPrincipal* aOriginPrincipal, nsIDocument* aDocument);
private:
~ImageValue();
public:
// Inherit operator== from URLValue
nsRefPtrHashtable<nsPtrHashKey<nsISupports>, imgRequestProxy> mRequests;