зеркало из https://github.com/mozilla/gecko-dev.git
Fix memory leaks from changeset dcda49ff1a26 - need to make sure that
the destructor gets called for the hashtable entries. Also fixes a nit (AddRef() -> NS_ADDREF_THIS()) r+sr=bz
This commit is contained in:
Родитель
7732f9a2ae
Коммит
f8b424f36e
|
@ -183,7 +183,7 @@ nsProgressNotificationProxy::GetInterface(const nsIID& iid,
|
|||
void** result) {
|
||||
if (iid.Equals(NS_GET_IID(nsIProgressEventSink))) {
|
||||
*result = static_cast<nsIProgressEventSink*>(this);
|
||||
AddRef();
|
||||
NS_ADDREF_THIS();
|
||||
return NS_OK;
|
||||
}
|
||||
if (mOriginalCallbacks)
|
||||
|
|
|
@ -126,6 +126,12 @@ RequestInfoHashInitEntry(PLDHashTable *table, PLDHashEntryHdr *entry,
|
|||
return PR_TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
RequestInfoHashClearEntry(PLDHashTable *table, PLDHashEntryHdr *entry)
|
||||
{
|
||||
nsRequestInfo* info = static_cast<nsRequestInfo *>(entry);
|
||||
info->~nsRequestInfo();
|
||||
}
|
||||
|
||||
struct nsListenerInfo {
|
||||
nsListenerInfo(nsIWeakReference *aListener, unsigned long aNotifyMask)
|
||||
|
@ -162,7 +168,7 @@ nsDocLoader::nsDocLoader()
|
|||
PL_DHashVoidPtrKeyStub,
|
||||
PL_DHashMatchEntryStub,
|
||||
PL_DHashMoveEntryStub,
|
||||
PL_DHashClearEntryStub,
|
||||
RequestInfoHashClearEntry,
|
||||
PL_DHashFinalizeStub,
|
||||
RequestInfoHashInitEntry
|
||||
};
|
||||
|
|
Загрузка…
Ссылка в новой задаче