зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1401662 - don't inline nsThreadManager::get(); r=erahm
Defining get() in the declaration of nsThreadManager 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:
Родитель
eb8ee79616
Коммит
3393422869
|
@ -105,6 +105,13 @@ NS_IMPL_CI_INTERFACE_GETTER(nsThreadManager, nsIThreadManager)
|
|||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
/*static*/ nsThreadManager&
|
||||
nsThreadManager::get()
|
||||
{
|
||||
static nsThreadManager sInstance;
|
||||
return sInstance;
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsThreadManager::Init()
|
||||
{
|
||||
|
|
|
@ -20,11 +20,7 @@ public:
|
|||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSITHREADMANAGER
|
||||
|
||||
static nsThreadManager& get()
|
||||
{
|
||||
static nsThreadManager sInstance;
|
||||
return sInstance;
|
||||
}
|
||||
static nsThreadManager& get();
|
||||
|
||||
nsresult Init();
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче