mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
bug 737412 - handle null sizeOfEntryExcludingThis pointer within ns{T,Base}Hashtable SizeOfExcludingThis functions. r=jfkthame
This commit is contained in:
parent
0c50aa229e
commit
4f8b8a75a5
@ -274,14 +274,15 @@ public:
|
||||
size_t SizeOfExcludingThis(SizeOfEntryExcludingThisFun sizeOfEntryExcludingThis,
|
||||
nsMallocSizeOfFun mallocSizeOf, void *userArg = nsnull)
|
||||
{
|
||||
if (IsInitialized()) {
|
||||
s_SizeOfArgs args = { sizeOfEntryExcludingThis, userArg };
|
||||
return PL_DHashTableSizeOfExcludingThis(&this->mTable,
|
||||
s_SizeOfStub,
|
||||
mallocSizeOf,
|
||||
&args);
|
||||
if (!IsInitialized()) {
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
if (sizeOfEntryExcludingThis) {
|
||||
s_SizeOfArgs args = { sizeOfEntryExcludingThis, userArg };
|
||||
return PL_DHashTableSizeOfExcludingThis(&this->mTable, s_SizeOfStub,
|
||||
mallocSizeOf, &args);
|
||||
}
|
||||
return PL_DHashTableSizeOfExcludingThis(&this->mTable, NULL, mallocSizeOf);
|
||||
}
|
||||
|
||||
protected:
|
||||
|
@ -288,11 +288,14 @@ public:
|
||||
size_t SizeOfExcludingThis(SizeOfEntryExcludingThisFun sizeOfEntryExcludingThis,
|
||||
nsMallocSizeOfFun mallocSizeOf, void *userArg = NULL) const
|
||||
{
|
||||
if (IsInitialized()) {
|
||||
if (!IsInitialized()) {
|
||||
return 0;
|
||||
}
|
||||
if (sizeOfEntryExcludingThis) {
|
||||
s_SizeOfArgs args = { sizeOfEntryExcludingThis, userArg };
|
||||
return PL_DHashTableSizeOfExcludingThis(&mTable, s_SizeOfStub, mallocSizeOf, &args);
|
||||
}
|
||||
return 0;
|
||||
return PL_DHashTableSizeOfExcludingThis(&mTable, NULL, mallocSizeOf);
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
|
Loading…
Reference in New Issue
Block a user