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

diff --git a/content/xslt/src/base/txExpandedNameMap.h b/content/xslt/src/base/txExpandedNameMap.h
--- a/content/xslt/src/base/txExpandedNameMap.h
+++ b/content/xslt/src/base/txExpandedNameMap.h
@@ -132,7 +132,7 @@ protected:
         void* mValue;
     };
     
-    nsTArray<MapItem> mItems;
+    nsTArray<MapItem, GCAllocator> mItems;
 };
 
 template<class E>
diff --git a/content/xslt/src/xml/txXMLUtils.h b/content/xslt/src/xml/txXMLUtils.h
--- a/content/xslt/src/xml/txXMLUtils.h
+++ b/content/xslt/src/xml/txXMLUtils.h
@@ -61,20 +61,26 @@ class txNamespaceMap;
 
 class txExpandedName {
 public:
-    txExpandedName() : mNamespaceID(kNameSpaceID_None)
-    {
+    txExpandedName()
+        : mNamespaceID(kNameSpaceID_None)
+        , mLocalName(nsnull)
+    {
+        ASSERT_StackObject(this);
     }
 
     txExpandedName(PRInt32 aNsID,
-                   nsIAtom* aLocalName) : mNamespaceID(aNsID),
-                                          mLocalName(aLocalName)
-    {
+                   nsIAtom* aLocalName)
+        : mNamespaceID(aNsID)
+        , mLocalName(aLocalName)
+    {
+        ASSERT_StackObject(this);
     }
 
     txExpandedName(const txExpandedName& aOther) :
         mNamespaceID(aOther.mNamespaceID),
         mLocalName(aOther.mLocalName)
     {
+        ASSERT_StackObject(this);
     }
 
     nsresult init(const nsAString& aQName, txNamespaceMap* aResolver,
@@ -111,7 +117,7 @@ public:
     }
 
     PRInt32 mNamespaceID;
-    nsCOMPtr<nsIAtom> mLocalName;
+    nsIAtom* mLocalName;
 };
 
 #ifdef TX_EXE
diff --git a/content/xslt/src/xslt/txKeyFunctionCall.cpp b/content/xslt/src/xslt/txKeyFunctionCall.cpp
--- a/content/xslt/src/xslt/txKeyFunctionCall.cpp
+++ b/content/xslt/src/xslt/txKeyFunctionCall.cpp
@@ -171,7 +171,7 @@ txKeyValueHashEntry::HashKey(const void*
         static_cast<const txKeyValueHashKey*>(aKey);
 
     return key->mKeyName.mNamespaceID ^
-           NS_PTR_TO_INT32(key->mKeyName.mLocalName.get()) ^
+           NS_PTR_TO_INT32(key->mKeyName.mLocalName) ^
            key->mRootIdentifier ^
            HashString(key->mKeyValue);
 }
@@ -193,7 +193,7 @@ txIndexedKeyHashEntry::HashKey(const voi
         static_cast<const txIndexedKeyHashKey*>(aKey);
 
     return key->mKeyName.mNamespaceID ^
-           NS_PTR_TO_INT32(key->mKeyName.mLocalName.get()) ^
+           NS_PTR_TO_INT32(key->mKeyName.mLocalName) ^
            key->mRootIdentifier;
 }