mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
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:
parent
d5f00639ad
commit
ce834cd636
@ -183,7 +183,7 @@ nsProgressNotificationProxy::GetInterface(const nsIID& iid,
|
|||||||
void** result) {
|
void** result) {
|
||||||
if (iid.Equals(NS_GET_IID(nsIProgressEventSink))) {
|
if (iid.Equals(NS_GET_IID(nsIProgressEventSink))) {
|
||||||
*result = static_cast<nsIProgressEventSink*>(this);
|
*result = static_cast<nsIProgressEventSink*>(this);
|
||||||
AddRef();
|
NS_ADDREF_THIS();
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
if (mOriginalCallbacks)
|
if (mOriginalCallbacks)
|
||||||
|
@ -126,6 +126,12 @@ RequestInfoHashInitEntry(PLDHashTable *table, PLDHashEntryHdr *entry,
|
|||||||
return PR_TRUE;
|
return PR_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
RequestInfoHashClearEntry(PLDHashTable *table, PLDHashEntryHdr *entry)
|
||||||
|
{
|
||||||
|
nsRequestInfo* info = static_cast<nsRequestInfo *>(entry);
|
||||||
|
info->~nsRequestInfo();
|
||||||
|
}
|
||||||
|
|
||||||
struct nsListenerInfo {
|
struct nsListenerInfo {
|
||||||
nsListenerInfo(nsIWeakReference *aListener, unsigned long aNotifyMask)
|
nsListenerInfo(nsIWeakReference *aListener, unsigned long aNotifyMask)
|
||||||
@ -162,7 +168,7 @@ nsDocLoader::nsDocLoader()
|
|||||||
PL_DHashVoidPtrKeyStub,
|
PL_DHashVoidPtrKeyStub,
|
||||||
PL_DHashMatchEntryStub,
|
PL_DHashMatchEntryStub,
|
||||||
PL_DHashMoveEntryStub,
|
PL_DHashMoveEntryStub,
|
||||||
PL_DHashClearEntryStub,
|
RequestInfoHashClearEntry,
|
||||||
PL_DHashFinalizeStub,
|
PL_DHashFinalizeStub,
|
||||||
RequestInfoHashInitEntry
|
RequestInfoHashInitEntry
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user