зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1406440 - don't inline nsSMILNullType::Singleton(); r=dholbert
Defining Singleton() in the declaration of nsSMILNullType implicitly sticks an "inline" on the function, which is not what we want: inlining it spreads around a lot of static initialization code. Providing an out-of-line definition is much better in terms of code size.
This commit is contained in:
Родитель
b2711ec3e9
Коммит
3e4ac652e8
|
@ -8,6 +8,13 @@
|
|||
#include "nsSMILValue.h"
|
||||
#include "nsDebug.h"
|
||||
|
||||
/*static*/ nsSMILNullType*
|
||||
nsSMILNullType::Singleton()
|
||||
{
|
||||
static nsSMILNullType sSingleton;
|
||||
return &sSingleton;
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsSMILNullType::Assign(nsSMILValue& aDest, const nsSMILValue& aSrc) const
|
||||
{
|
||||
|
|
|
@ -14,12 +14,7 @@ class nsSMILNullType : public nsISMILType
|
|||
{
|
||||
public:
|
||||
// Singleton for nsSMILValue objects to hold onto.
|
||||
static nsSMILNullType*
|
||||
Singleton()
|
||||
{
|
||||
static nsSMILNullType sSingleton;
|
||||
return &sSingleton;
|
||||
}
|
||||
static nsSMILNullType* Singleton();
|
||||
|
||||
protected:
|
||||
// nsISMILType Methods
|
||||
|
|
Загрузка…
Ссылка в новой задаче