root-rdfstuff
author Benjamin Smedberg <benjamin@smedbergs.us>
Sat, 26 Jul 2008 22:49:39 -0400
changeset 167 a4da40849f5436e629c5732f4368c6c48189637f
parent 82 ba505859ba00a5a9298ad653bb5e124cb263c5f4
permissions -rw-r--r--
State as of now

diff --git a/rdf/base/src/nsNameSpaceMap.cpp b/rdf/base/src/nsNameSpaceMap.cpp
--- a/rdf/base/src/nsNameSpaceMap.cpp
+++ b/rdf/base/src/nsNameSpaceMap.cpp
@@ -50,12 +50,6 @@ nsNameSpaceMap::~nsNameSpaceMap()
 nsNameSpaceMap::~nsNameSpaceMap()
 {
     MOZ_COUNT_DTOR(nsNameSpaceMap);
-
-    while (mEntries) {
-        Entry* doomed = mEntries;
-        mEntries = mEntries->mNext;
-        delete doomed;
-    }
 }
 
 nsresult
diff --git a/rdf/base/src/nsNameSpaceMap.h b/rdf/base/src/nsNameSpaceMap.h
--- a/rdf/base/src/nsNameSpaceMap.h
+++ b/rdf/base/src/nsNameSpaceMap.h
@@ -47,7 +47,7 @@ class nsNameSpaceMap
 class nsNameSpaceMap
 {
 public:
-    class Entry {
+    class Entry : public XPCOMGCFinalizedObject, public MMgc::GCFinalizable {
     public:
         Entry(const nsCSubstring& aURI, nsIAtom* aPrefix)
             : mURI(aURI), mPrefix(aPrefix), mNext(nsnull) {
diff --git a/rdf/base/src/nsRDFXMLSerializer.h b/rdf/base/src/nsRDFXMLSerializer.h
--- a/rdf/base/src/nsRDFXMLSerializer.h
+++ b/rdf/base/src/nsRDFXMLSerializer.h
@@ -135,7 +135,7 @@ protected:
     nsXPIDLCString mBaseURLSpec;
 
     // hash mapping resources to utf8-encoded QNames
-    nsDataHashtable<nsISupportsHashKey, nsCString> mQNames;
+    nsDataHashtable<nsISupportsHashKey, nsCString, GCAllocator> mQNames;
     friend class QNameCollector;
 
     PRUint32 mPrefixID;