mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-14 04:03:47 +00:00
Bug 903543 - eliminate static constructors from SMIL types (and destructors, in opt builds); r=dholbert
This commit is contained in:
parent
8db7f31f7a
commit
af19be5428
@ -42,8 +42,10 @@ protected:
|
||||
private:
|
||||
// Private constructor & destructor: prevent instances beyond my singleton,
|
||||
// and prevent others from deleting my singleton.
|
||||
SMILBoolType() {}
|
||||
MOZ_CONSTEXPR SMILBoolType() {}
|
||||
#ifdef DEBUG
|
||||
~SMILBoolType() {}
|
||||
#endif
|
||||
};
|
||||
|
||||
} // namespace mozilla
|
||||
|
@ -43,8 +43,10 @@ protected:
|
||||
private:
|
||||
// Private constructor & destructor: prevent instances beyond my singleton,
|
||||
// and prevent others from deleting my singleton.
|
||||
SMILEnumType() {}
|
||||
MOZ_CONSTEXPR SMILEnumType() {}
|
||||
#ifdef DEBUG
|
||||
~SMILEnumType() {}
|
||||
#endif
|
||||
};
|
||||
|
||||
} // namespace mozilla
|
||||
|
@ -37,7 +37,10 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
SMILIntegerType() {}
|
||||
MOZ_CONSTEXPR SMILIntegerType() {}
|
||||
#ifdef DEBUG
|
||||
~SMILIntegerType() {}
|
||||
#endif
|
||||
};
|
||||
|
||||
} // namespace mozilla
|
||||
|
@ -43,8 +43,10 @@ protected:
|
||||
private:
|
||||
// Private constructor & destructor: prevent instances beyond my singleton,
|
||||
// and prevent others from deleting my singleton.
|
||||
SMILStringType() {}
|
||||
MOZ_CONSTEXPR SMILStringType() {}
|
||||
#ifdef DEBUG
|
||||
~SMILStringType() {}
|
||||
#endif
|
||||
};
|
||||
|
||||
} // namespace mozilla
|
||||
|
@ -6,6 +6,7 @@
|
||||
#ifndef NS_ISMILTYPE_H_
|
||||
#define NS_ISMILTYPE_H_
|
||||
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "nscore.h"
|
||||
|
||||
class nsSMILValue;
|
||||
@ -212,8 +213,17 @@ protected:
|
||||
* Protected destructor, to ensure that no one accidentally deletes an
|
||||
* instance of this class.
|
||||
* (The only instances in existence should be singletons - one per subclass.)
|
||||
*
|
||||
* This destructor and the destructors of subclasses are only defined in
|
||||
* debug builds. For non-debug builds, we let the compiler define the
|
||||
* default (public) constructor. The compiler understands that the default
|
||||
* destructor doesn't necessarily need to be invoked (e.g. if there are no
|
||||
* members to destroy) and so will avoid creating static destructors (and
|
||||
* registering them with static *constructors*) in non-debug builds.
|
||||
*/
|
||||
#ifdef DEBUG
|
||||
~nsISMILType() {}
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif // NS_ISMILTYPE_H_
|
||||
|
@ -100,8 +100,10 @@ public:
|
||||
private:
|
||||
// Private constructor & destructor: prevent instances beyond my singleton,
|
||||
// and prevent others from deleting my singleton.
|
||||
nsSMILCSSValueType() {}
|
||||
MOZ_CONSTEXPR nsSMILCSSValueType() {}
|
||||
#ifdef DEBUG
|
||||
~nsSMILCSSValueType() {}
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif // NS_SMILCSSVALUETYPE_H_
|
||||
|
@ -41,8 +41,10 @@ protected:
|
||||
private:
|
||||
// Private constructor & destructor: prevent instances beyond my singleton,
|
||||
// and prevent others from deleting my singleton.
|
||||
nsSMILFloatType() {}
|
||||
MOZ_CONSTEXPR nsSMILFloatType() {}
|
||||
#ifdef DEBUG
|
||||
~nsSMILFloatType() {}
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif // NS_SMILFLOATTYPE_H_
|
||||
|
@ -44,8 +44,10 @@ protected:
|
||||
private:
|
||||
// Private constructor & destructor: prevent instances beyond my singleton,
|
||||
// and prevent others from deleting my singleton.
|
||||
nsSMILNullType() {}
|
||||
MOZ_CONSTEXPR nsSMILNullType() {}
|
||||
#ifdef DEBUG
|
||||
~nsSMILNullType() {}
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif // NS_SMILNULLTYPE_H_
|
||||
|
@ -45,8 +45,10 @@ protected:
|
||||
private:
|
||||
// Private constructor & destructor: prevent instances beyond my singleton,
|
||||
// and prevent others from deleting my singleton.
|
||||
SVGIntegerPairSMILType() {}
|
||||
MOZ_CONSTEXPR SVGIntegerPairSMILType() {}
|
||||
#ifdef DEBUG
|
||||
~SVGIntegerPairSMILType() {}
|
||||
#endif
|
||||
};
|
||||
|
||||
} // namespace mozilla
|
||||
|
@ -93,8 +93,10 @@ protected:
|
||||
private:
|
||||
// Private constructor & destructor: prevent instances beyond my singleton,
|
||||
// and prevent others from deleting my singleton.
|
||||
SVGLengthListSMILType() {}
|
||||
MOZ_CONSTEXPR SVGLengthListSMILType() {}
|
||||
#ifdef DEBUG
|
||||
~SVGLengthListSMILType() {}
|
||||
#endif
|
||||
};
|
||||
|
||||
} // namespace mozilla
|
||||
|
@ -73,8 +73,10 @@ public:
|
||||
private:
|
||||
// Private constructor & destructor: prevent instances beyond my singleton,
|
||||
// and prevent others from deleting my singleton.
|
||||
SVGMotionSMILType() {}
|
||||
MOZ_CONSTEXPR SVGMotionSMILType() {}
|
||||
#ifdef DEBUG
|
||||
~SVGMotionSMILType() {}
|
||||
#endif
|
||||
};
|
||||
|
||||
} // namespace mozilla
|
||||
|
@ -47,8 +47,10 @@ protected:
|
||||
private:
|
||||
// Private constructor & destructor: prevent instances beyond my singleton,
|
||||
// and prevent others from deleting my singleton.
|
||||
SVGNumberListSMILType() {}
|
||||
MOZ_CONSTEXPR SVGNumberListSMILType() {}
|
||||
#ifdef DEBUG
|
||||
~SVGNumberListSMILType() {}
|
||||
#endif
|
||||
};
|
||||
|
||||
} // namespace mozilla
|
||||
|
@ -40,8 +40,10 @@ protected:
|
||||
private:
|
||||
// Private constructor & destructor: prevent instances beyond my singleton,
|
||||
// and prevent others from deleting my singleton.
|
||||
SVGNumberPairSMILType() {}
|
||||
MOZ_CONSTEXPR SVGNumberPairSMILType() {}
|
||||
#ifdef DEBUG
|
||||
~SVGNumberPairSMILType() {}
|
||||
#endif
|
||||
};
|
||||
|
||||
} // namespace mozilla
|
||||
|
@ -60,8 +60,10 @@ protected:
|
||||
private:
|
||||
// Private constructor & destructor: prevent instances beyond my singleton,
|
||||
// and prevent others from deleting my singleton.
|
||||
SVGOrientSMILType() {}
|
||||
MOZ_CONSTEXPR SVGOrientSMILType() {}
|
||||
#ifdef DEBUG
|
||||
~SVGOrientSMILType() {}
|
||||
#endif
|
||||
};
|
||||
|
||||
} // namespace mozilla
|
||||
|
@ -51,8 +51,10 @@ protected:
|
||||
private:
|
||||
// Private constructor & destructor: prevent instances beyond my singleton,
|
||||
// and prevent others from deleting my singleton.
|
||||
SVGPathSegListSMILType() {}
|
||||
MOZ_CONSTEXPR SVGPathSegListSMILType() {}
|
||||
#ifdef DEBUG
|
||||
~SVGPathSegListSMILType() {}
|
||||
#endif
|
||||
};
|
||||
|
||||
} // namespace mozilla
|
||||
|
@ -47,8 +47,10 @@ protected:
|
||||
private:
|
||||
// Private constructor & destructor: prevent instances beyond my singleton,
|
||||
// and prevent others from deleting my singleton.
|
||||
SVGPointListSMILType() {}
|
||||
MOZ_CONSTEXPR SVGPointListSMILType() {}
|
||||
#ifdef DEBUG
|
||||
~SVGPointListSMILType() {}
|
||||
#endif
|
||||
};
|
||||
|
||||
} // namespace mozilla
|
||||
|
@ -123,8 +123,10 @@ public:
|
||||
private:
|
||||
// Private constructor & destructor: prevent instances beyond my singleton,
|
||||
// and prevent others from deleting my singleton.
|
||||
SVGTransformListSMILType() {}
|
||||
MOZ_CONSTEXPR SVGTransformListSMILType() {}
|
||||
#ifdef DEBUG
|
||||
~SVGTransformListSMILType() {}
|
||||
#endif
|
||||
};
|
||||
|
||||
} // end namespace mozilla
|
||||
|
@ -40,8 +40,10 @@ protected:
|
||||
private:
|
||||
// Private constructor & destructor: prevent instances beyond my singleton,
|
||||
// and prevent others from deleting my singleton.
|
||||
SVGViewBoxSMILType() {}
|
||||
MOZ_CONSTEXPR SVGViewBoxSMILType() {}
|
||||
#ifdef DEBUG
|
||||
~SVGViewBoxSMILType() {}
|
||||
#endif
|
||||
};
|
||||
|
||||
} // namespace mozilla
|
||||
|
Loading…
x
Reference in New Issue
Block a user