From c9db7beab8deb2998ac9284850852e3cf6555a31 Mon Sep 17 00:00:00 2001 From: "waterson%netscape.com" Date: Wed, 30 Aug 2000 04:21:06 +0000 Subject: [PATCH] Bug 50499. Fix FMM that was caused by DOM string changes. r=bruce --- content/xul/document/src/nsElementMap.cpp | 6 +++--- rdf/content/src/nsElementMap.cpp | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/content/xul/document/src/nsElementMap.cpp b/content/xul/document/src/nsElementMap.cpp index bb0e660428c5..2ebd4d032ef4 100644 --- a/content/xul/document/src/nsElementMap.cpp +++ b/content/xul/document/src/nsElementMap.cpp @@ -131,7 +131,7 @@ nsElementMap::ReleaseContentList(PLHashEntry* aHashEntry, PRIntn aIndex, void* a PRUnichar* id = NS_REINTERPRET_CAST(PRUnichar*, NS_CONST_CAST(void*, aHashEntry->key)); - delete[] id; + nsMemory::Free(id); ContentListItem* head = NS_REINTERPRET_CAST(ContentListItem*, aHashEntry->value); @@ -299,7 +299,7 @@ nsElementMap::Remove(const nsAReadableString& aID, nsIContent* aContent) // It was the last reference in the table PRUnichar* key = NS_REINTERPRET_CAST(PRUnichar*, NS_CONST_CAST(void*, (*hep)->key)); PL_HashTableRawRemove(mMap, hep, *hep); - delete[] key; + nsMemory::Free(key); } delete head; } @@ -403,7 +403,7 @@ nsElementMap::EnumerateImpl(PLHashEntry* aHashEntry, PRIntn aIndex, void* aClosu // It's the last content node that was mapped to this // ID. Unhash it. PRUnichar* key = NS_CONST_CAST(PRUnichar*, id); - delete[] key; + nsMemory::Free(key); return HT_ENUMERATE_REMOVE; } } diff --git a/rdf/content/src/nsElementMap.cpp b/rdf/content/src/nsElementMap.cpp index bb0e660428c5..2ebd4d032ef4 100644 --- a/rdf/content/src/nsElementMap.cpp +++ b/rdf/content/src/nsElementMap.cpp @@ -131,7 +131,7 @@ nsElementMap::ReleaseContentList(PLHashEntry* aHashEntry, PRIntn aIndex, void* a PRUnichar* id = NS_REINTERPRET_CAST(PRUnichar*, NS_CONST_CAST(void*, aHashEntry->key)); - delete[] id; + nsMemory::Free(id); ContentListItem* head = NS_REINTERPRET_CAST(ContentListItem*, aHashEntry->value); @@ -299,7 +299,7 @@ nsElementMap::Remove(const nsAReadableString& aID, nsIContent* aContent) // It was the last reference in the table PRUnichar* key = NS_REINTERPRET_CAST(PRUnichar*, NS_CONST_CAST(void*, (*hep)->key)); PL_HashTableRawRemove(mMap, hep, *hep); - delete[] key; + nsMemory::Free(key); } delete head; } @@ -403,7 +403,7 @@ nsElementMap::EnumerateImpl(PLHashEntry* aHashEntry, PRIntn aIndex, void* aClosu // It's the last content node that was mapped to this // ID. Unhash it. PRUnichar* key = NS_CONST_CAST(PRUnichar*, id); - delete[] key; + nsMemory::Free(key); return HT_ENUMERATE_REMOVE; } }