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

* * *
* * *

diff --git a/netwerk/base/src/nsStandardURL.cpp b/netwerk/base/src/nsStandardURL.cpp
--- a/netwerk/base/src/nsStandardURL.cpp
+++ b/netwerk/base/src/nsStandardURL.cpp
@@ -167,6 +167,7 @@ nsSegmentEncoder::nsSegmentEncoder(const
 nsSegmentEncoder::nsSegmentEncoder(const char *charset)
     : mCharset(charset)
 {
+    ASSERT_StackObject(this);
 }
 
 PRInt32 nsStandardURL::
@@ -248,7 +249,7 @@ nsSegmentEncoder::InitUnicodeEncoder()
         }
     }
 
-    rv = gCharsetMgr->GetUnicodeEncoder(mCharset, getter_AddRefs(mEncoder));
+    rv = gCharsetMgr->GetUnicodeEncoder(mCharset, &mEncoder);
     if (NS_FAILED(rv)) {
         NS_ERROR("failed to get unicode encoder");
         mEncoder = 0; // just in case
diff --git a/netwerk/base/src/nsStandardURL.h b/netwerk/base/src/nsStandardURL.h
--- a/netwerk/base/src/nsStandardURL.h
+++ b/netwerk/base/src/nsStandardURL.h
@@ -141,7 +141,7 @@ public: /* internal -- HPUX compiler can
         
         const char* mCharset;  // Caller should keep this alive for
                                // the life of the segment encoder
-        nsCOMPtr<nsIUnicodeEncoder> mEncoder;
+        nsIUnicodeEncoder* mEncoder;
     };
     friend class nsSegmentEncoder;
 
diff --git a/netwerk/dns/src/nsHostResolver.h b/netwerk/dns/src/nsHostResolver.h
--- a/netwerk/dns/src/nsHostResolver.h
+++ b/netwerk/dns/src/nsHostResolver.h
@@ -131,6 +131,7 @@ public:
  * nsHostResolver - an asynchronous host name resolver.
  */
 class nsHostResolver : public XPCOMGCFinalizedObject
+                     , public MMgc::GCFinalizable
 {
 public:
     /**
diff --git a/netwerk/protocol/http/src/nsHttpConnectionMgr.h b/netwerk/protocol/http/src/nsHttpConnectionMgr.h
--- a/netwerk/protocol/http/src/nsHttpConnectionMgr.h
+++ b/netwerk/protocol/http/src/nsHttpConnectionMgr.h
@@ -52,7 +52,8 @@ class nsHttpPipeline;
 
 //-----------------------------------------------------------------------------
 
-class nsHttpConnectionMgr
+class nsHttpConnectionMgr : public XPCOMGCFinalizedObject
+                          , public MMgc::GCFinalizable
 {
 public:
 
@@ -86,17 +87,14 @@ public:
     // NOTE: functions below may be called on any thread.
     //-------------------------------------------------------------------------
 
-    nsrefcnt AddRef()
-    {
-        return PR_AtomicIncrement(&mRef);
+    void AddRef()
+    {
+	NS_WARNING("Don't call me");
     }
 
-    nsrefcnt Release()
-    {
-        nsrefcnt n = PR_AtomicDecrement(&mRef);
-        if (n == 0)
-            delete this;
-        return n;
+    void Release()
+    {
+	NS_WARNING("Don't call me");
     }
 
     // adds a transaction to the list of managed transactions.