Bug 975037, part 1 - Inline nsPersistentProperties::Init. r=froydnj

This commit is contained in:
Andrew McCreight 2014-02-27 10:04:10 -08:00
parent 0353960345
commit 84553968b8
2 changed files with 4 additions and 10 deletions

View File

@ -446,7 +446,10 @@ nsPersistentProperties::nsPersistentProperties()
: mIn(nullptr)
{
mSubclass = static_cast<nsIPersistentProperties*>(this);
mTable.ops = nullptr;
PL_DHashTableInit(&mTable, &property_HashTableOps, nullptr,
sizeof(PropertyTableEntry), 20);
PL_INIT_ARENA_POOL(&mArena, "PersistentPropertyArena", 2048);
}
@ -457,13 +460,6 @@ nsPersistentProperties::~nsPersistentProperties()
PL_DHashTableFinish(&mTable);
}
void
nsPersistentProperties::Init()
{
PL_DHashTableInit(&mTable, &property_HashTableOps, nullptr,
sizeof(PropertyTableEntry), 20);
}
nsresult
nsPersistentProperties::Create(nsISupports *aOuter, REFNSIID aIID, void **aResult)
{
@ -474,7 +470,6 @@ nsPersistentProperties::Create(nsISupports *aOuter, REFNSIID aIID, void **aResul
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(props);
props->Init();
nsresult rv = props->QueryInterface(aIID, aResult);
NS_RELEASE(props);

View File

@ -19,7 +19,6 @@ class nsPersistentProperties MOZ_FINAL : public nsIPersistentProperties
{
public:
nsPersistentProperties();
void Init();
NS_DECL_THREADSAFE_ISUPPORTS
NS_DECL_NSIPROPERTIES