Backed out changeset 7e5d581bc86d
authorDoug Turner <dougt@meer.net>
Wed, 08 Oct 2008 21:10:25 -0700
changeset 20190 b0120922280c2e168417ed145c54efa3f1020411
parent 20189 7e5d581bc86d5c2a7c26025f38c503b53be3c31a
child 20191 6e049856d31652091ffa3fed5bd22213d9944309
push idunknown
push userunknown
push dateunknown
milestone1.9.1b2pre
backs out7e5d581bc86d5c2a7c26025f38c503b53be3c31a
Backed out changeset 7e5d581bc86d
xpcom/proxy/tests/Makefile.in
xpcom/proxy/tests/nsITestProxy.idl
xpcom/proxy/tests/nsITestProxyOrig.idl
xpcom/proxy/tests/proxy-create-threadsafety.cpp
xpcom/proxy/tests/proxytests.cpp
xpcom/proxy/tests/testproxyclasses.cpp
xpcom/proxy/tests/testproxyclasses.h
xpcom/reflect/xptcall/src/md/win32/xptc_arm_ceppc.asm
--- a/xpcom/proxy/tests/Makefile.in
+++ b/xpcom/proxy/tests/Makefile.in
@@ -44,26 +44,17 @@ include $(DEPTH)/config/autoconf.mk
 
 MODULE		= xpcom_tests
 XPIDL_MODULE	= proxytest
 REQUIRES	= xpcom
 
 CPPSRCS		= proxytests.cpp \
 		proxy-create-threadsafety.cpp \
 		$(NULL)
-
-CPP_UNIT_TESTS += \
-  proxytests.cpp \
-  proxy-create-threadsafety.cpp \
-  $(NULL)
-
-XPIDLSRCS  = \
-  nsITestProxy.idl \
-  nsITestProxyOrig.idl \
-  $(NULL)
+XPIDLSRCS	= nsITestProxy.idl
 
 SIMPLE_PROGRAMS	= $(CPPSRCS:.cpp=$(BIN_SUFFIX)) 
 
 LIBS		= \
 		$(DIST)/lib/$(LIB_PREFIX)xpcomglue_s.$(LIB_SUFFIX) \
 		$(XPCOM_LIBS) \
 		$(NSPR_LIBS) \
 		$(NULL)
--- a/xpcom/proxy/tests/nsITestProxy.idl
+++ b/xpcom/proxy/tests/nsITestProxy.idl
@@ -1,81 +1,9 @@
 #include "nsISupports.idl"
 
-[uuid(1979e980-1cfd-11d3-915e-0000863011c5)]
+[uuid(1979e980-1cfd-11d3-915e-0000863011c4)]
 interface nsITestProxy : nsISupports 
 {
-long Test(in long p1, in long p2);
-nsresult Test2();
-nsresult Test3(in nsISupports p1, out nsISupports p2);
-
-nsresult Test1_1(inout PRInt32 p1);
-nsresult Test1_2(inout PRInt64 p1);
-nsresult Test1_3(inout float p1);
-nsresult Test1_4(inout double p1);
-nsresult Test1_5(inout nsISupports p1);
-
-nsresult Test2_1(inout PRInt32 p1, inout PRInt32 p2);
-nsresult Test2_2(inout PRInt64 p1, inout PRInt64 p2);
-nsresult Test2_3(inout float p1, inout float p2);
-nsresult Test2_4(inout double p1, inout double p2);
-nsresult Test2_5(inout nsISupports p1, inout nsISupports p2);
-
-nsresult Test3_1(inout PRInt32 p1, inout PRInt32 p2, inout PRInt32 p3);
-nsresult Test3_2(inout PRInt64 p1, inout PRInt64 p2, inout PRInt64 p3);
-nsresult Test3_3(inout float p1, inout float p2, inout float p3);
-nsresult Test3_4(inout double p1, inout double p2, inout double p3);
-nsresult Test3_5(inout nsISupports p1, inout nsISupports p2, inout nsISupports p3);
-
-nsresult Test4_1(inout PRInt32 p1, inout PRInt32 p2, inout PRInt32 p3, inout PRInt32 p4);
-nsresult Test4_2(inout PRInt64 p1, inout PRInt64 p2, inout PRInt64 p3, inout PRInt64 p4);
-nsresult Test4_3(inout float p1, inout float p2, inout float p3, inout float p4);
-nsresult Test4_4(inout double p1, inout double p2, inout double p3, inout double p4);
-nsresult Test4_5(inout nsISupports p1, inout nsISupports p2, inout nsISupports p3, inout nsISupports p4);
-
-nsresult Test5_1(inout PRInt32 p1, inout PRInt32 p2, inout PRInt32 p3, inout PRInt32 p4, inout PRInt32 p5);
-nsresult Test5_2(inout PRInt64 p1, inout PRInt64 p2, inout PRInt64 p3, inout PRInt64 p4, inout PRInt64 p5);
-nsresult Test5_3(inout float p1, inout float p2, inout float p3, inout float p4, inout float p5);
-nsresult Test5_4(inout double p1, inout double p2, inout double p3, inout double p4, inout double p5);
-nsresult Test5_5(inout nsISupports p1, inout nsISupports p2, inout nsISupports p3, inout nsISupports p4, inout nsISupports p5);
-
-nsresult Test6_1(inout PRInt32 p1, inout PRInt32 p2, inout PRInt32 p3, inout PRInt32 p4, inout PRInt32 p5, inout PRInt32 p6);
-nsresult Test6_2(inout PRInt64 p1, inout PRInt64 p2, inout PRInt64 p3, inout PRInt64 p4, inout PRInt64 p5, inout PRInt64 p6);
-nsresult Test6_3(inout float p1, inout float p2, inout float p3, inout float p4, inout float p5, inout float p6);
-nsresult Test6_4(inout double p1, inout double p2, inout double p3, inout double p4, inout double p5, inout double p6);
-nsresult Test6_5(inout nsISupports p1, inout nsISupports p2, inout nsISupports p3, inout nsISupports p4, inout nsISupports p5, inout nsISupports p6);
-
-nsresult Test7_1(inout PRInt32 p1, inout PRInt32 p2, inout PRInt32 p3, inout PRInt32 p4, inout PRInt32 p5, inout PRInt32 p6, inout PRInt32 p7);
-nsresult Test7_2(inout PRInt64 p1, inout PRInt64 p2, inout PRInt64 p3, inout PRInt64 p4, inout PRInt64 p5, inout PRInt64 p6, inout PRInt64 p7);
-nsresult Test7_3(inout float p1, inout float p2, inout float p3, inout float p4, inout float p5, inout float p6, inout float p7);
-nsresult Test7_4(inout double p1, inout double p2, inout double p3, inout double p4, inout double p5, inout double p6, inout double p7);
-nsresult Test7_5(inout nsISupports p1, inout nsISupports p2, inout nsISupports p3, inout nsISupports p4, inout nsISupports p5, inout nsISupports p6, inout nsISupports p7);
-
-nsresult Test8_1(inout PRInt32 p1, inout PRInt32 p2, inout PRInt32 p3, inout PRInt32 p4, inout PRInt32 p5, inout PRInt32 p6, inout PRInt32 p7, inout PRInt32 p8);
-nsresult Test8_2(inout PRInt64 p1, inout PRInt64 p2, inout PRInt64 p3, inout PRInt64 p4, inout PRInt64 p5, inout PRInt64 p6, inout PRInt64 p7, inout PRInt64 p8);
-nsresult Test8_3(inout float p1, inout float p2, inout float p3, inout float p4, inout float p5, inout float p6, inout float p7, inout float p8);
-nsresult Test8_4(inout double p1, inout double p2, inout double p3, inout double p4, inout double p5, inout double p6, inout double p7, inout double p8);
-nsresult Test8_5(inout nsISupports p1, inout nsISupports p2, inout nsISupports p3, inout nsISupports p4, inout nsISupports p5, inout nsISupports p6, inout nsISupports p7, inout nsISupports p8);
-
-nsresult Test9_1(inout PRInt32 p1, inout PRInt32 p2, inout PRInt32 p3, inout PRInt32 p4, inout PRInt32 p5, inout PRInt32 p6, inout PRInt32 p7, inout PRInt32 p8, inout PRInt32 p9);
-nsresult Test9_2(inout PRInt64 p1, inout PRInt64 p2, inout PRInt64 p3, inout PRInt64 p4, inout PRInt64 p5, inout PRInt64 p6, inout PRInt64 p7, inout PRInt64 p8, inout PRInt64 p9);
-nsresult Test9_3(inout float p1, inout float p2, inout float p3, inout float p4, inout float p5, inout float p6, inout float p7, inout float p8, inout float p9);
-nsresult Test9_4(inout double p1, inout double p2, inout double p3, inout double p4, inout double p5, inout double p6, inout double p7, inout double p8, inout double p9);
-nsresult Test9_5(inout nsISupports p1, inout nsISupports p2, inout nsISupports p3, inout nsISupports p4, inout nsISupports p5, inout nsISupports p6, inout nsISupports p7, inout nsISupports p8, inout nsISupports p9);
-
-nsresult Test10_1(inout PRInt32 p1, inout PRInt32 p2, inout PRInt32 p3, inout PRInt32 p4, inout PRInt32 p5, inout PRInt32 p6, inout PRInt32 p7, inout PRInt32 p8, inout PRInt32 p9, inout PRInt32 p10);
-nsresult Test10_2(inout PRInt64 p1, inout PRInt64 p2, inout PRInt64 p3, inout PRInt64 p4, inout PRInt64 p5, inout PRInt64 p6, inout PRInt64 p7, inout PRInt64 p8, inout PRInt64 p9, inout PRInt64 p10);
-nsresult Test10_3(inout float p1, inout float p2, inout float p3, inout float p4, inout float p5, inout float p6, inout float p7, inout float p8, inout float p9, inout float p10);
-nsresult Test10_4(inout double p1, inout double p2, inout double p3, inout double p4, inout double p5, inout double p6, inout double p7, inout double p8, inout double p9, inout double p10);
-nsresult Test10_5(inout nsISupports p1, inout nsISupports p2, inout nsISupports p3, inout nsISupports p4, inout nsISupports p5, inout nsISupports p6, inout nsISupports p7, inout nsISupports p8, inout nsISupports p9, inout nsISupports p10);
-
+    long Test(in long p1, in long p2);
+    void Test2();
+    void Test3(in nsISupports p1, out nsISupports p2);
 };
-
-
-[uuid(1979e980-1cfd-11d3-915e-0000863011c6)]
-interface nsITestProxy2 : nsISupports 
-{
-long Test(in long p1, in long p2);
-nsresult Test2();
-nsresult Test3(in nsISupports p1, out nsISupports p2);
-
-};
-
deleted file mode 100644
--- a/xpcom/proxy/tests/nsITestProxyOrig.idl
+++ /dev/null
@@ -1,9 +0,0 @@
-#include "nsISupports.idl"
-
-[uuid(1979e980-1cfd-11d3-915e-0000863011c4)]
-interface nsITestProxyOrig : nsISupports
-{
-    long Test(in long p1, in long p2);
-    void Test2();
-    void Test3(in nsISupports p1, out nsISupports p2);
-};
--- a/xpcom/proxy/tests/proxy-create-threadsafety.cpp
+++ b/xpcom/proxy/tests/proxy-create-threadsafety.cpp
@@ -45,17 +45,17 @@
 #include "nsAutoPtr.h"
 #include "nsAutoLock.h"
 #include "nsCOMPtr.h"
 
 #include "nscore.h"
 #include "nspr.h"
 #include "prmon.h"
 
-#include "nsITestProxyOrig.h"
+#include "nsITestProxy.h"
 #include "nsISupportsPrimitives.h"
 
 #include "nsIRunnable.h"
 #include "nsIProxyObjectManager.h"
 #include "nsXPCOMCIDInternal.h"
 #include "nsComponentManagerUtils.h"
 #include "nsServiceManagerUtils.h"
 #include "nsThreadUtils.h"
@@ -87,174 +87,174 @@ 1		proxy event object released
 
  */
 
 /***************************************************************************/
 /* ProxyTest                                                               */
 /***************************************************************************/
 
 class ProxyTest : public nsIRunnable,
-public nsITestProxyOrig,
-public nsISupportsPrimitive
+                  public nsITestProxy,
+                  public nsISupportsPrimitive
 {
-        public:
-                ProxyTest()
-                                : mCounter(0)
-                {}
-
-                NS_IMETHOD Run()
-                {
-                        nsresult rv;
-                        nsCOMPtr<nsIProxyObjectManager> pom =
-                                do_GetService(NS_XPCOMPROXY_CONTRACTID, &rv);
-                        NS_ENSURE_SUCCESS(rv, rv);
+public:
+    ProxyTest()
+        : mCounter(0)
+    {}
 
-                        nsCOMPtr<nsISupportsPrimitive> prim;
-                        rv = pom->GetProxyForObject(NS_PROXY_TO_MAIN_THREAD,
-                                NS_GET_IID(nsISupportsPrimitive),
-                                NS_ISUPPORTS_CAST(nsIRunnable*, this),
-                                NS_PROXY_SYNC | NS_PROXY_ALWAYS,
-                                getter_AddRefs(prim));
-                        NS_ENSURE_SUCCESS(rv, rv);
+    NS_IMETHOD Run()
+    {
+        nsresult rv;
+        nsCOMPtr<nsIProxyObjectManager> pom =
+            do_GetService(NS_XPCOMPROXY_CONTRACTID, &rv);
+        NS_ENSURE_SUCCESS(rv, rv);
+        
+        nsCOMPtr<nsISupportsPrimitive> prim;
+        rv = pom->GetProxyForObject(NS_PROXY_TO_MAIN_THREAD,
+                                    NS_GET_IID(nsISupportsPrimitive),
+                                    NS_ISUPPORTS_CAST(nsIRunnable*, this),
+                                    NS_PROXY_SYNC | NS_PROXY_ALWAYS,
+                                    getter_AddRefs(prim));
+        NS_ENSURE_SUCCESS(rv, rv);
         /* we don't actually need to use the proxied object */
-                        return NS_OK;
-                }
+        return NS_OK;
+    }
 
-                NS_IMETHOD Test(PRInt32 p1, PRInt32 p2, PRInt32 *_retval)
-                {
-                        nsresult rv;
+    NS_IMETHOD Test(PRInt32 p1, PRInt32 p2, PRInt32 *_retval)
+    {
+        nsresult rv;
 
-                        if (!NS_IsMainThread())
-                                return NS_ERROR_UNEXPECTED;
+        if (!NS_IsMainThread())
+            return NS_ERROR_UNEXPECTED;
 
-                        mCounterLock = nsAutoLock::NewLock(__FILE__ " counter lock");
-                        NS_ENSURE_TRUE(mCounterLock, NS_ERROR_OUT_OF_MEMORY);
-                        mEvilMonitor = nsAutoMonitor::NewMonitor(__FILE__ " evil monitor");
-                        NS_ENSURE_TRUE(mEvilMonitor, NS_ERROR_OUT_OF_MEMORY);
+        mCounterLock = nsAutoLock::NewLock(__FILE__ " counter lock");
+        NS_ENSURE_TRUE(mCounterLock, NS_ERROR_OUT_OF_MEMORY);
+        mEvilMonitor = nsAutoMonitor::NewMonitor(__FILE__ " evil monitor");
+        NS_ENSURE_TRUE(mEvilMonitor, NS_ERROR_OUT_OF_MEMORY);
 
         /* note that we don't have an event queue... */
 
-                        rv = NS_NewThread(getter_AddRefs(mThreadOne),
-                                          static_cast<nsIRunnable*>(this));
-                        NS_ENSURE_SUCCESS(rv, rv);
-                        rv = NS_NewThread(getter_AddRefs(mThreadTwo),
-                                          static_cast<nsIRunnable*>(this));
-                        NS_ENSURE_SUCCESS(rv, rv);
+        rv = NS_NewThread(getter_AddRefs(mThreadOne),
+                          static_cast<nsIRunnable*>(this));
+        NS_ENSURE_SUCCESS(rv, rv);
+        rv = NS_NewThread(getter_AddRefs(mThreadTwo),
+                          static_cast<nsIRunnable*>(this));
+        NS_ENSURE_SUCCESS(rv, rv);
 
-                        rv = mThreadOne->Shutdown();
-                        NS_ENSURE_SUCCESS(rv, rv);
-                        rv = mThreadTwo->Shutdown();
-                        NS_ENSURE_SUCCESS(rv, rv);
+        rv = mThreadOne->Shutdown();
+        NS_ENSURE_SUCCESS(rv, rv);
+        rv = mThreadTwo->Shutdown();
+        NS_ENSURE_SUCCESS(rv, rv);
 
-                        return NS_OK;
-                }
+        return NS_OK;
+    }
 
-                NS_IMETHOD Test2(void)
-                {
-                        return NS_ERROR_NOT_IMPLEMENTED;
-                }
+    NS_IMETHOD Test2(void)
+    {
+        return NS_ERROR_NOT_IMPLEMENTED;
+    }
 
-                NS_IMETHOD Test3(nsISupports *p1, nsISupports **p2)
-                {
-                        return NS_ERROR_NOT_IMPLEMENTED;
-                }
+    NS_IMETHOD Test3(nsISupports *p1, nsISupports **p2)
+    {
+        return NS_ERROR_NOT_IMPLEMENTED;
+    }
 
-                NS_IMETHOD GetType(PRUint16 *_retval)
-                {
-                        return NS_ERROR_NOT_IMPLEMENTED;
-                }
+    NS_IMETHOD GetType(PRUint16 *_retval)
+    {
+        return NS_ERROR_NOT_IMPLEMENTED;
+    }
 
-                NS_IMETHOD QueryInterface(REFNSIID aIID, void** aInstancePtr)
-                {
-                        NS_ASSERTION(aInstancePtr,
-                                     "QueryInterface requires a non-NULL destination!");
-                        nsISupports* foundInterface;
-                        if ( aIID.Equals(NS_GET_IID(nsIRunnable)) ) {
-                                foundInterface = static_cast<nsIRunnable*>(this);
-                        } else if ( aIID.Equals(NS_GET_IID(nsITestProxyOrig)) ) {
-                                foundInterface = static_cast<nsITestProxyOrig*>(this);
-                        } else if ( aIID.Equals(NS_GET_IID(nsISupports)) ) {
-                                foundInterface = NS_ISUPPORTS_CAST(nsIRunnable*, this);
-                        } else if ( aIID.Equals(NS_GET_IID(nsISupportsPrimitive)) ) {
-                                {
-                                        nsAutoLock counterLock(mCounterLock);
-                                        switch(mCounter) {
-                                                case 0:
-                                                        ++mCounter;
-                                                        {
+    NS_IMETHOD QueryInterface(REFNSIID aIID, void** aInstancePtr)
+    {
+        NS_ASSERTION(aInstancePtr,
+                     "QueryInterface requires a non-NULL destination!");
+        nsISupports* foundInterface;
+        if ( aIID.Equals(NS_GET_IID(nsIRunnable)) ) {
+            foundInterface = static_cast<nsIRunnable*>(this);
+        } else if ( aIID.Equals(NS_GET_IID(nsITestProxy)) ) {
+            foundInterface = static_cast<nsITestProxy*>(this);
+        } else if ( aIID.Equals(NS_GET_IID(nsISupports)) ) {
+            foundInterface = NS_ISUPPORTS_CAST(nsIRunnable*, this);
+        } else if ( aIID.Equals(NS_GET_IID(nsISupportsPrimitive)) ) {
+            {
+                nsAutoLock counterLock(mCounterLock);
+                switch(mCounter) {
+                    case 0:
+                        ++mCounter;
+                    {
                         /* be evil here and hang */
-                                                                nsAutoUnlock counterUnlock(mCounterLock);
-                                                                nsAutoMonitor evilMonitor(mEvilMonitor);
-                                                                nsresult rv = evilMonitor.Wait();
-                                                                NS_ENSURE_SUCCESS(rv, rv);
-                                                                break;
-                                                        }
-                                                case 1:
-                                                        ++mCounter;
-                                                        {
+                        nsAutoUnlock counterUnlock(mCounterLock);
+                        nsAutoMonitor evilMonitor(mEvilMonitor);
+                        nsresult rv = evilMonitor.Wait();
+                        NS_ENSURE_SUCCESS(rv, rv);
+                        break;
+                    }
+                    case 1:
+                        ++mCounter;
+                    {
                         /* okay, we had our fun, un-hang */
-                                                                nsAutoUnlock counterUnlock(mCounterLock);
-                                                                nsAutoMonitor evilMonitor(mEvilMonitor);
-                                                                nsresult rv = evilMonitor.Notify();
-                                                                NS_ENSURE_SUCCESS(rv, rv);
-                                                                break;
-                                                        }
-                                                default: {
+                        nsAutoUnlock counterUnlock(mCounterLock);
+                        nsAutoMonitor evilMonitor(mEvilMonitor);
+                        nsresult rv = evilMonitor.Notify();
+                        NS_ENSURE_SUCCESS(rv, rv);
+                        break;
+                    }
+                    default: {
                         /* nothing special here */
-                                                                 ++mCounter;
-                                                         }
-                                        }
-                                        ++mCounter;
-                                }
+                        ++mCounter;
+                    }
+                }
+                ++mCounter;
+            }
             // remeber to admit to supporting this interface
-                                foundInterface = static_cast<nsISupportsPrimitive*>(this);
-                        } else {
-                                foundInterface = nsnull;
-                        }
-                        nsresult rv;
-                        if (!foundInterface) {
-                                rv = NS_ERROR_NO_INTERFACE;
-                        } else {
-                                NS_ADDREF(foundInterface);
-                                rv = NS_OK;
-                        }
-                        *aInstancePtr = foundInterface;
-                        return rv;
-                }
+            foundInterface = static_cast<nsISupportsPrimitive*>(this);
+        } else {
+            foundInterface = nsnull;
+        }
+        nsresult status;
+        if (!foundInterface) {
+            status = NS_ERROR_NO_INTERFACE;
+        } else {
+            NS_ADDREF(foundInterface);
+            status = NS_OK;
+        }
+        *aInstancePtr = foundInterface;
+        return status;
+    }
 
-                NS_IMETHOD_(nsrefcnt) AddRef(void);
-                NS_IMETHOD_(nsrefcnt) Release(void);
+    NS_IMETHOD_(nsrefcnt) AddRef(void);
+    NS_IMETHOD_(nsrefcnt) Release(void);
 
-        protected:
-                nsAutoRefCnt mRefCnt;
-                NS_DECL_OWNINGTHREAD
+protected:
+    nsAutoRefCnt mRefCnt;
+    NS_DECL_OWNINGTHREAD
 
-        private:
-                        PRLock* mCounterLock;
-                        PRMonitor* mEvilMonitor;
-                        PRInt32 mCounter;
-                        nsCOMPtr<nsIThread> mThreadOne;
-                        nsCOMPtr<nsIThread> mThreadTwo;
+private:
+    PRLock* mCounterLock;
+    PRMonitor* mEvilMonitor;
+    PRInt32 mCounter;
+    nsCOMPtr<nsIThread> mThreadOne;
+    nsCOMPtr<nsIThread> mThreadTwo;
 };
 
 NS_IMPL_THREADSAFE_ADDREF(ProxyTest)
 NS_IMPL_THREADSAFE_RELEASE(ProxyTest)
 
 int
-   main(int argc, char **argv)
+main(int argc, char **argv)
 {
-        NS_InitXPCOM2(nsnull, nsnull, nsnull);
+    NS_InitXPCOM2(nsnull, nsnull, nsnull);
 
     // Scope code so everything is destroyed before we run call NS_ShutdownXPCOM
-        {
-                nsCOMPtr<nsIComponentRegistrar> registrar;
-                NS_GetComponentRegistrar(getter_AddRefs(registrar));
-                registrar->AutoRegister(nsnull);
+    {
+        nsCOMPtr<nsIComponentRegistrar> registrar;
+        NS_GetComponentRegistrar(getter_AddRefs(registrar));
+        registrar->AutoRegister(nsnull);
 
-                nsCOMPtr<nsITestProxyOrig> tester = new ProxyTest();
-                tester->Test(0, 0, nsnull);
-        }
+        nsCOMPtr<nsITestProxy> tester = new ProxyTest();
+        tester->Test(0, 0, nsnull);
+    }
 
-        NS_ShutdownXPCOM(nsnull);
+    NS_ShutdownXPCOM(nsnull);
 
-        return 0;
+    return 0;
 }
 
--- a/xpcom/proxy/tests/proxytests.cpp
+++ b/xpcom/proxy/tests/proxytests.cpp
@@ -56,44 +56,147 @@
 #include "nsIRunnable.h"
 #include "nsIProxyObjectManager.h"
 #include "nsIThreadPool.h"
 #include "nsXPCOMCIDInternal.h"
 #include "nsComponentManagerUtils.h"
 #include "nsServiceManagerUtils.h"
 #include "nsThreadUtils.h"
 
-#include "testproxyclasses.h"
-
-
 #include "prlog.h"
 #ifdef PR_LOGGING
-PRLogModuleInfo *sLog = PR_NewLogModule("Test");
+static PRLogModuleInfo *sLog = PR_NewLogModule("Test");
 #define LOG(args) PR_LOG(sLog, PR_LOG_DEBUG, args)
 #else
 #define LOG(args) printf args
 #endif
 
-
-
+namespace proxytests {
 
 static nsresult
 GetThreadFromPRThread(PRThread *prthread, nsIThread **result)
 {
   LOG(("TEST: GetThreadFromPRThread [%p]\n", prthread));
 
   nsCOMPtr<nsIThreadManager> tm = do_GetService(NS_THREADMANAGER_CONTRACTID);
   NS_ENSURE_STATE(tm);
   return tm->GetThreadFromPRThread(prthread, result);
 }
 
+/***************************************************************************/
+/* nsTestXPCFoo                                                            */
+/***************************************************************************/
+class nsTestXPCFoo : public nsITestProxy
+{
+    NS_DECL_ISUPPORTS
+    NS_IMETHOD Test(PRInt32 p1, PRInt32 p2, PRInt32* retval);
+    NS_IMETHOD Test2();
+    NS_IMETHOD Test3(nsISupports *p1, nsISupports **p2);
+
+    nsTestXPCFoo();
+};
+
+nsTestXPCFoo::nsTestXPCFoo()
+{
+    NS_ADDREF_THIS();
+}
+
+NS_IMPL_ISUPPORTS1(nsTestXPCFoo, nsITestProxy)
+
+NS_IMETHODIMP nsTestXPCFoo::Test(PRInt32 p1, PRInt32 p2, PRInt32* retval)
+{
+    LOG(("TEST: Thread (%d) Test Called successfully! Party on...\n", p1));
+    *retval = p1+p2;
+    return NS_OK;
+}
+
+
+NS_IMETHODIMP nsTestXPCFoo::Test2()
+{
+    LOG(("TEST: The quick brown netscape jumped over the old lazy ie..\n"));
+
+    return NS_OK;
+}
+
+NS_IMETHODIMP nsTestXPCFoo::Test3(nsISupports *p1, nsISupports **p2)
+{
+    if (p1 != nsnull)
+    {
+        nsITestProxy *test;
+
+        p1->QueryInterface(NS_GET_IID(nsITestProxy), (void**)&test);
+        
+        test->Test2();
+        PRInt32 a;
+        test->Test( 1, 2, &a);
+        LOG(("TEST: \n1+2=%d\n",a));
+    }
 
 
-// I really do not like the forced SIMPLE_PROGRAMS Makefile paradigm
-#include "testproxyclasses.cpp"
+    *p2 = new nsTestXPCFoo();
+    return NS_OK;
+}
+
+/***************************************************************************/
+/* nsTestXPCFoo2                                                           */
+/***************************************************************************/
+class nsTestXPCFoo2 : public nsITestProxy
+{
+    NS_DECL_ISUPPORTS
+    NS_IMETHOD Test(PRInt32 p1, PRInt32 p2, PRInt32* retval);
+    NS_IMETHOD Test2();
+    NS_IMETHOD Test3(nsISupports *p1, nsISupports **p2);
+
+    nsTestXPCFoo2();
+};
+
+nsTestXPCFoo2::nsTestXPCFoo2()
+{
+    NS_ADDREF_THIS();
+}
+
+NS_IMPL_THREADSAFE_ISUPPORTS1(nsTestXPCFoo2, nsITestProxy)
+
+NS_IMETHODIMP nsTestXPCFoo2::Test(PRInt32 p1, PRInt32 p2, PRInt32* retval)
+{
+    LOG(("TEST: calling back to caller!\n"));
+
+    nsCOMPtr<nsIProxyObjectManager> manager =
+            do_GetService(NS_XPCOMPROXY_CONTRACTID);
+
+    LOG(("TEST: ProxyObjectManager: %p \n", (void *) manager.get()));
+    
+    PR_ASSERT(manager);
+
+    nsCOMPtr<nsIThread> thread;
+    GetThreadFromPRThread((PRThread *) p1, getter_AddRefs(thread));
+    NS_ENSURE_STATE(thread);
+
+    nsCOMPtr<nsITestProxy> proxyObject;
+    manager->GetProxyForObject(thread, NS_GET_IID(nsITestProxy), this, NS_PROXY_SYNC, (void**)&proxyObject);
+    proxyObject->Test3(nsnull, nsnull);
+    
+    LOG(("TEST: Deleting Proxy Object\n"));
+    return NS_OK;
+}
+
+
+NS_IMETHODIMP nsTestXPCFoo2::Test2()
+{
+    LOG(("TEST: nsTestXPCFoo2::Test2() called\n"));
+
+    return NS_OK;
+}
+
+
+NS_IMETHODIMP nsTestXPCFoo2::Test3(nsISupports *p1, nsISupports **p2)
+{
+    LOG(("TEST: Got called"));
+    return NS_OK;
+}
 
 
 
 #if 0
 struct ArgsStruct {
     nsIThread* thread;
     PRInt32    threadNumber;
 };
@@ -143,16 +246,17 @@ void TestCase_TwoClassesOneInterface(voi
         printf("Deleting real Object 2 (%d)\n", threadNumber);
         NS_RELEASE(foo2);
 
 
         printf("Thread (%d) Prior to calling proxyObject->Test.\n", threadNumber);
         rv = proxyObject->Test(threadNumber, 0, &a);   
         printf("Thread (%d) error: %d.\n", threadNumber, rv);
 
+
         printf("Thread (%d) Prior to calling proxyObject->Test2.\n", threadNumber);
         rv = proxyObject->Test2();   
         printf("Thread (%d) error: %d.\n", threadNumber, rv);
 
         printf("Thread (%d) Prior to calling proxyObject2->Test2.\n", threadNumber);
         rv = proxyObject2->Test2();   
         printf("Thread (%d) proxyObject2 error: %d.\n", threadNumber, rv);
 
@@ -163,636 +267,61 @@ void TestCase_TwoClassesOneInterface(voi
         NS_RELEASE(proxyObject2);
     }    
 
     PR_Sleep( PR_MillisecondsToInterval(1000) );  // If your thread goes away, your stack goes away.  Only use ASYNC on calls that do not have out parameters
 }
 #endif
 
 
-void TestCase_1_Failure()
-{
-        nsCOMPtr<nsIProxyObjectManager> manager =
-                do_GetService(NS_XPCOMPROXY_CONTRACTID);
-
-        LOG(("TestCase_1_Failure: ProxyObjectManager: %p\n", (void *) manager.get()));
-
-        PR_ASSERT(manager);
-
-        nsITestProxy         *proxyObject;
-        nsTestXPCFoo*         foo   = new nsTestXPCFoo();
-
-        PR_ASSERT(foo);
-
-        LOG(("TestCase_1_Failure: xsTestXPCFoo Object Created [0x%08X] => \n", foo));
-
-        PRInt32 a1;
-        nsresult rv, r;
-
-        a1=10;
-        LOG(("TestCase_1_Failure: DIRECT 1_1: Entry: [%d] => \n", a1));
-        printf("TestCase_1_Failure: DIRECT 1_1: Entry: [%d] => \n", a1);
-        rv = foo->Test1_1(&a1, &r);
-        LOG(("TestCase_1_Failure: DIRECT 1_1: Return:                                         => [%d] --> Returns %d, rv=%d\n", a1, r, rv));
-        printf("TestCase_1_Failure: DIRECT 1_1: Return: => [%d] --> Returns %d, rv=%d\n", a1, r, rv);
-
-
-        nsCOMPtr<nsIThread> eventLoopThread;
-        NS_NewThread(getter_AddRefs(eventLoopThread));
-
-        PRThread *eventLoopPRThread;
-        eventLoopThread->GetPRThread(&eventLoopPRThread);
-        PR_ASSERT(eventLoopPRThread);
-
-        nsCOMPtr<nsIThread> thread;
-        GetThreadFromPRThread(eventLoopPRThread, getter_AddRefs(thread));
-
-        manager->GetProxyForObject(thread, NS_GET_IID(nsITestProxy), foo, NS_PROXY_SYNC, (void**)&proxyObject);
-
-        LOG(("TestCase_1_Failure: Deleting real nsTestXPCFoo Object [0x%08X]\n", foo));
-        NS_RELEASE(foo);
-
-        if (proxyObject)
-        {
-                a1=10;
-                LOG(("TestCase_1_Failure: PROXY 1_1: Entry: [%d] => \n", a1));
-                printf("TestCase_1_Failure: PROXY 1_1: Entry: [%d] => \n", a1);
-                rv = proxyObject->Test1_1(&a1, &r);
-                LOG(("TestCase_1_Failure: PROXY 1_1: Return:                                         => [%d] --> Returns %d, rv=%d\n", a1, r, rv));
-                printf("TestCase_1_Failure: PROXY 1_1: Return: => [%d] --> Returns %d, rv=%d\n", a1, r, rv);
-
-                LOG(("TestCase_1_Failure: Deleting Proxy Object [0x%08X]\n", proxyObject));
-                NS_RELEASE(proxyObject);
-        }
-
-        PR_Sleep( PR_MillisecondsToInterval(1000) );  // If your thread goes away, your stack goes away.  Only use ASYNC on calls that do not have out parameters
-}
-
-
-void TestCase_1_DirectTests(nsTestXPCFoo *foo)
-{
-        PRInt32 a1, b1, c1, d1, e1, f1, g1, h1, i1, j1;
-        nsresult rv, r;
-        a1=10; b1=20; c1=30; d1=40; e1=50; f1=60; g1=70; h1=80; i1=90; j1=100;
-        LOG(("NestedLoop: DIRECT TEST 10_1: Entry: [%d, %d, %d, %d, %d, %d, %d, %d, %d, %d] => \n", a1, b1, c1, d1, e1, f1, g1, h1, i1, j1));
-        printf("NestedLoop: DIRECT TEST 10_1: Entry: [%d, %d, %d, %d, %d, %d, %d, %d, %d, %d] => \n", a1, b1, c1, d1, e1, f1, g1, h1, i1, j1);
-        rv = foo->Test10_1(&a1, &b1, &c1, &d1, &e1, &f1, &g1, &h1, &i1, &j1, &r);
-        LOG(("NestedLoop: DIRECT TEST 10_1: Return:                                         => [%d, %d, %d, %d, %d, %d, %d, %d, %d, %d] --> Returns %d, rv=%d\n", a1, b1, c1, d1, e1, f1, g1, h1, i1, j1, r, rv));
-        printf("NestedLoop: DIRECT TEST 10_1: Return: => [%d, %d, %d, %d, %d, %d, %d, %d, %d, %d] --> Returns %d, rv=%d\n", a1, b1, c1, d1, e1, f1, g1, h1, i1, j1, r, rv);
-
-        a1=10; b1=20; c1=30; d1=40; e1=50; f1=60; g1=70; h1=80; i1=90;
-        LOG(("NestedLoop: DIRECT TEST 9_1: Entry: [%d, %d, %d, %d, %d, %d, %d, %d, %d] => \n", a1, b1, c1, d1, e1, f1, g1, h1, i1));
-        printf("NestedLoop: DIRECT TEST 9_1: Entry: [%d, %d, %d, %d, %d, %d, %d, %d, %d] => \n", a1, b1, c1, d1, e1, f1, g1, h1, i1);
-        rv = foo->Test9_1(&a1, &b1, &c1, &d1, &e1, &f1, &g1, &h1, &i1, &r);
-        LOG(("NestedLoop: DIRECT TEST 9_1: Return:                                         => [%d, %d, %d, %d, %d, %d, %d, %d, %d] --> Returns %d, rv=%d\n", a1, b1, c1, d1, e1, f1, g1, h1, i1, r, rv));
-        printf("NestedLoop: DIRECT TEST 9_1: Return: => [%d, %d, %d, %d, %d, %d, %d, %d, %d] --> Returns %d, rv=%d\n", a1, b1, c1, d1, e1, f1, g1, h1, i1, r, rv);
-
-        a1=10; b1=20; c1=30; d1=40; e1=50; f1=60; g1=70; h1=80;
-        LOG(("NestedLoop: DIRECT TEST 8_1: Entry: [%d, %d, %d, %d, %d, %d, %d, %d] => \n", a1, b1, c1, d1, e1, f1, g1, h1));
-        printf("NestedLoop: DIRECT TEST 8_1: Entry: [%d, %d, %d, %d, %d, %d, %d, %d] => \n", a1, b1, c1, d1, e1, f1, g1, h1);
-        rv = foo->Test8_1(&a1, &b1, &c1, &d1, &e1, &f1, &g1, &h1, &r);
-        LOG(("NestedLoop: DIRECT TEST 8_1: Return:                                         => [%d, %d, %d, %d, %d, %d, %d, %d] --> Returns %d, rv=%d\n", a1, b1, c1, d1, e1, f1, g1, h1, r, rv));
-        printf("NestedLoop: DIRECT TEST 8_1: Return: => [%d, %d, %d, %d, %d, %d, %d, %d] --> Returns %d, rv=%d\n", a1, b1, c1, d1, e1, f1, g1, h1, r, rv);
-
-        a1=10; b1=20; c1=30; d1=40; e1=50; f1=60; g1=70;
-        LOG(("NestedLoop: DIRECT TEST 7_1: Entry: [%d, %d, %d, %d, %d, %d, %d] => \n", a1, b1, c1, d1, e1, f1, g1));
-        printf("NestedLoop: DIRECT TEST 7_1: Entry: [%d, %d, %d, %d, %d, %d, %d] => \n", a1, b1, c1, d1, e1, f1, g1);
-        rv = foo->Test7_1(&a1, &b1, &c1, &d1, &e1, &f1, &g1, &r);
-        LOG(("NestedLoop: DIRECT TEST 7_1: Return:                                         => [%d, %d, %d, %d, %d, %d, %d] --> Returns %d, rv=%d\n", a1, b1, c1, d1, e1, f1, g1, r, rv));
-        printf("NestedLoop: DIRECT TEST 7_1: Return: => [%d, %d, %d, %d, %d, %d, %d] --> Returns %d, rv=%d\n", a1, b1, c1, d1, e1, f1, g1, r, rv);
-
-        a1=10; b1=20; c1=30; d1=40; e1=50; f1=60;
-        LOG(("NestedLoop: DIRECT TEST 6_1: Entry: [%d, %d, %d, %d, %d, %d] => \n", a1, b1, c1, d1, e1, f1));
-        printf("NestedLoop: DIRECT TEST 6_1: Entry: [%d, %d, %d, %d, %d, %d] => \n", a1, b1, c1, d1, e1, f1);
-        rv = foo->Test6_1(&a1, &b1, &c1, &d1, &e1, &f1, &r);
-        LOG(("NestedLoop: DIRECT TEST 6_1: Return:                                         => [%d, %d, %d, %d, %d, %d] --> Returns %d, rv=%d\n", a1, b1, c1, d1, e1, f1, r, rv));
-        printf("NestedLoop: DIRECT TEST 6_1: Return: => [%d, %d, %d, %d, %d, %d] --> Returns %d, rv=%d\n", a1, b1, c1, d1, e1, f1, r, rv);
-
-        a1=10; b1=20; c1=30; d1=40; e1=50;
-        LOG(("NestedLoop: DIRECT TEST 5_1: Entry: [%d, %d, %d, %d, %d] => \n", a1, b1, c1, d1, e1));
-        printf("NestedLoop: DIRECT TEST 5_1: Entry: [%d, %d, %d, %d, %d] => \n", a1, b1, c1, d1, e1);
-        rv = foo->Test5_1(&a1, &b1, &c1, &d1, &e1, &r);
-        LOG(("NestedLoop: DIRECT TEST 5_1: Return:                                         => [%d, %d, %d, %d, %d] --> Returns %d, rv=%d\n", a1, b1, c1, d1, e1, r, rv));
-        printf("NestedLoop: DIRECT TEST 5_1: Return: => [%d, %d, %d, %d, %d] --> Returns %d, rv=%d\n", a1, b1, c1, d1, e1, r, rv);
-
-        a1=10; b1=20; c1=30; d1=40;
-        LOG(("NestedLoop: DIRECT TEST 4_1: Entry: [%d, %d, %d, %d] => \n", a1, b1, c1, d1));
-        printf("NestedLoop: DIRECT TEST 4_1: Entry: [%d, %d, %d, %d] => \n", a1, b1, c1, d1);
-        rv = foo->Test4_1(&a1, &b1, &c1, &d1, &r);
-        LOG(("NestedLoop: DIRECT TEST 4_1: Return:                                         => [%d, %d, %d, %d] --> Returns %d, rv=%d\n", a1, b1, c1, d1, r, rv));
-        printf("NestedLoop: DIRECT TEST 4_1: Return: => [%d, %d, %d, %d] --> Returns %d, rv=%d\n", a1, b1, c1, d1, r, rv);
-
-        a1=10; b1=20; c1=30;
-        LOG(("NestedLoop: DIRECT TEST 3_1: Entry: [%d, %d, %d] => \n", a1, b1, c1));
-        printf("NestedLoop: DIRECT TEST 3_1: Entry: [%d, %d, %d] => \n", a1, b1, c1);
-        rv = foo->Test3_1(&a1, &b1, &c1, &r);
-        LOG(("NestedLoop: DIRECT TEST 3_1: Return:                                         => [%d, %d, %d] --> Returns %d, rv=%d\n", a1, b1, c1, r, rv));
-        printf("NestedLoop: DIRECT TEST 3_1: Return: => [%d, %d, %d] --> Returns %d, rv=%d\n", a1, b1, c1, r, rv);
-
-        a1=10; b1=20;
-        LOG(("NestedLoop: DIRECT TEST 2_1: Entry: [%d, %d] => \n", a1, b1));
-        printf("NestedLoop: DIRECT TEST 2_1: Entry: [%d, %d] => \n", a1, b1);
-        rv = foo->Test2_1(&a1, &b1, &r);
-        LOG(("NestedLoop: DIRECT TEST 2_1: Return:                                         => [%d, %d] --> Returns %d, rv=%d\n", a1, b1, r, rv));
-        printf("NestedLoop: DIRECT TEST 2_1: Return: => [%d, %d] --> Returns %d, rv=%d\n", a1, b1, r, rv);
-
-        a1=10;
-        LOG(("NestedLoop: DIRECT TEST 1_1: Entry: [%d] => \n", a1));
-        printf("NestedLoop: DIRECT TEST 1_1: Entry: [%d] => \n", a1);
-        rv = foo->Test1_1(&a1, &r);
-        LOG(("NestedLoop: DIRECT TEST 1_1: Return:                                         => [%d] --> Returns %d, rv=%d\n", a1, r, rv));
-        printf("NestedLoop: DIRECT TEST 1_1: Return: => [%d] --> Returns %d, rv=%d\n", a1, r, rv);
-}
-
-
-void TestCase_1_ProxyTests(nsITestProxy *proxyObject)
-{
-        PRInt32 a1, b1, c1, d1, e1, f1, g1, h1, i1, j1;
-        nsresult rv, r;
-        a1=10; b1=20; c1=30; d1=40; e1=50; f1=60; g1=70; h1=80; i1=90; j1=100;
-        LOG(("NestedLoop: TEST 10_1: Entry: [%d, %d, %d, %d, %d, %d, %d, %d, %d, %d] => \n", a1, b1, c1, d1, e1, f1, g1, h1, i1, j1));
-        printf("NestedLoop: TEST 10_1: Entry: [%d, %d, %d, %d, %d, %d, %d, %d, %d, %d] => \n", a1, b1, c1, d1, e1, f1, g1, h1, i1, j1);
-        rv = proxyObject->Test10_1(&a1, &b1, &c1, &d1, &e1, &f1, &g1, &h1, &i1, &j1, &r);
-        LOG(("NestedLoop: TEST 10_1: Return:                                         => [%d, %d, %d, %d, %d, %d, %d, %d, %d, %d] --> Returns %d, rv=%d\n", a1, b1, c1, d1, e1, f1, g1, h1, i1, j1, r, rv));
-        printf("NestedLoop: TEST 10_1: Return: => [%d, %d, %d, %d, %d, %d, %d, %d, %d, %d] --> Returns %d, rv=%d\n", a1, b1, c1, d1, e1, f1, g1, h1, i1, j1, r, rv);
-
-        a1=10; b1=20; c1=30; d1=40; e1=50; f1=60; g1=70; h1=80; i1=90;
-        LOG(("NestedLoop: TEST 9_1: Entry: [%d, %d, %d, %d, %d, %d, %d, %d, %d] => \n", a1, b1, c1, d1, e1, f1, g1, h1, i1));
-        printf("NestedLoop: TEST 9_1: Entry: [%d, %d, %d, %d, %d, %d, %d, %d, %d] => \n", a1, b1, c1, d1, e1, f1, g1, h1, i1);
-        rv = proxyObject->Test9_1(&a1, &b1, &c1, &d1, &e1, &f1, &g1, &h1, &i1, &r);
-        LOG(("NestedLoop: TEST 9_1: Return:                                         => [%d, %d, %d, %d, %d, %d, %d, %d, %d] --> Returns %d, rv=%d\n", a1, b1, c1, d1, e1, f1, g1, h1, i1, r, rv));
-        printf("NestedLoop: TEST 9_1: Return: => [%d, %d, %d, %d, %d, %d, %d, %d, %d] --> Returns %d, rv=%d\n", a1, b1, c1, d1, e1, f1, g1, h1, i1, r, rv);
-
-        a1=10; b1=20; c1=30; d1=40; e1=50; f1=60; g1=70; h1=80;
-        LOG(("NestedLoop: TEST 8_1: Entry: [%d, %d, %d, %d, %d, %d, %d, %d] => \n", a1, b1, c1, d1, e1, f1, g1, h1));
-        printf("NestedLoop: TEST 8_1: Entry: [%d, %d, %d, %d, %d, %d, %d, %d] => \n", a1, b1, c1, d1, e1, f1, g1, h1);
-        rv = proxyObject->Test8_1(&a1, &b1, &c1, &d1, &e1, &f1, &g1, &h1, &r);
-        LOG(("NestedLoop: TEST 8_1: Return:                                         => [%d, %d, %d, %d, %d, %d, %d, %d] --> Returns %d, rv=%d\n", a1, b1, c1, d1, e1, f1, g1, h1, r, rv));
-        printf("NestedLoop: TEST 8_1: Return: => [%d, %d, %d, %d, %d, %d, %d, %d] --> Returns %d, rv=%d\n", a1, b1, c1, d1, e1, f1, g1, h1, r, rv);
-
-        a1=10; b1=20; c1=30; d1=40; e1=50; f1=60; g1=70;
-        LOG(("NestedLoop: TEST 7_1: Entry: [%d, %d, %d, %d, %d, %d, %d] => \n", a1, b1, c1, d1, e1, f1, g1));
-        printf("NestedLoop: TEST 7_1: Entry: [%d, %d, %d, %d, %d, %d, %d] => \n", a1, b1, c1, d1, e1, f1, g1);
-        rv = proxyObject->Test7_1(&a1, &b1, &c1, &d1, &e1, &f1, &g1, &r);
-        LOG(("NestedLoop: TEST 7_1: Return:                                         => [%d, %d, %d, %d, %d, %d, %d] --> Returns %d, rv=%d\n", a1, b1, c1, d1, e1, f1, g1, r, rv));
-        printf("NestedLoop: TEST 7_1: Return: => [%d, %d, %d, %d, %d, %d, %d] --> Returns %d, rv=%d\n", a1, b1, c1, d1, e1, f1, g1, r, rv);
-
-        a1=10; b1=20; c1=30; d1=40; e1=50; f1=60;
-        LOG(("NestedLoop: TEST 6_1: Entry: [%d, %d, %d, %d, %d, %d] => \n", a1, b1, c1, d1, e1, f1));
-        printf("NestedLoop: TEST 6_1: Entry: [%d, %d, %d, %d, %d, %d] => \n", a1, b1, c1, d1, e1, f1);
-        rv = proxyObject->Test6_1(&a1, &b1, &c1, &d1, &e1, &f1, &r);
-        LOG(("NestedLoop: TEST 6_1: Return:                                         => [%d, %d, %d, %d, %d, %d] --> Returns %d, rv=%d\n", a1, b1, c1, d1, e1, f1, r, rv));
-        printf("NestedLoop: TEST 6_1: Return: => [%d, %d, %d, %d, %d, %d] --> Returns %d, rv=%d\n", a1, b1, c1, d1, e1, f1, r, rv);
-
-        a1=10; b1=20; c1=30; d1=40; e1=50;
-        LOG(("NestedLoop: TEST 5_1: Entry: [%d, %d, %d, %d, %d] => \n", a1, b1, c1, d1, e1));
-        printf("NestedLoop: TEST 5_1: Entry: [%d, %d, %d, %d, %d] => \n", a1, b1, c1, d1, e1);
-        rv = proxyObject->Test5_1(&a1, &b1, &c1, &d1, &e1, &r);
-        LOG(("NestedLoop: TEST 5_1: Return:                                         => [%d, %d, %d, %d, %d] --> Returns %d, rv=%d\n", a1, b1, c1, d1, e1, r, rv));
-        printf("NestedLoop: TEST 5_1: Return: => [%d, %d, %d, %d, %d] --> Returns %d, rv=%d\n", a1, b1, c1, d1, e1, r, rv);
-
-        a1=10; b1=20; c1=30; d1=40;
-        LOG(("NestedLoop: TEST 4_1: Entry: [%d, %d, %d, %d] => \n", a1, b1, c1, d1));
-        printf("NestedLoop: TEST 4_1: Entry: [%d, %d, %d, %d] => \n", a1, b1, c1, d1);
-        rv = proxyObject->Test4_1(&a1, &b1, &c1, &d1, &r);
-        LOG(("NestedLoop: TEST 4_1: Return:                                         => [%d, %d, %d, %d] --> Returns %d, rv=%d\n", a1, b1, c1, d1, r, rv));
-        printf("NestedLoop: TEST 4_1: Return: => [%d, %d, %d, %d] --> Returns %d, rv=%d\n", a1, b1, c1, d1, r, rv);
-
-        a1=10; b1=20; c1=30;
-        LOG(("NestedLoop: TEST 3_1: Entry: [%d, %d, %d] => \n", a1, b1, c1));
-        printf("NestedLoop: TEST 3_1: Entry: [%d, %d, %d] => \n", a1, b1, c1);
-        rv = proxyObject->Test3_1(&a1, &b1, &c1, &r);
-        LOG(("NestedLoop: TEST 3_1: Return:                                         => [%d, %d, %d] --> Returns %d, rv=%d\n", a1, b1, c1, r, rv));
-        printf("NestedLoop: TEST 3_1: Return: => [%d, %d, %d] --> Returns %d, rv=%d\n", a1, b1, c1, r, rv);
-
-        a1=10; b1=20;
-        LOG(("NestedLoop: TEST 2_1: Entry: [%d, %d] => \n", a1, b1));
-        printf("NestedLoop: TEST 2_1: Entry: [%d, %d] => \n", a1, b1);
-        rv = proxyObject->Test2_1(&a1, &b1, &r);
-        LOG(("NestedLoop: TEST 2_1: Return:                                         => [%d, %d] --> Returns %d, rv=%d\n", a1, b1, r, rv));
-        printf("NestedLoop: TEST 2_1: Return: => [%d, %d] --> Returns %d, rv=%d\n", a1, b1, r, rv);
-
-        a1=10;
-        LOG(("NestedLoop: TEST 1_1: Entry: [%d] => \n", a1));
-        printf("NestedLoop: TEST 1_1: Entry: [%d] => \n", a1);
-        rv = proxyObject->Test1_1(&a1, &r);
-        LOG(("NestedLoop: TEST 1_1: Return:                                         => [%d] --> Returns %d, rv=%d\n", a1, r, rv));
-        printf("NestedLoop: TEST 1_1: Return: => [%d] --> Returns %d, rv=%d\n", a1, r, rv);
-}
-
-
-void TestCase_2_ProxyTests(nsITestProxy *proxyObject)
-{
-        PRInt64 a1, b1, c1, d1, e1, f1, g1, h1, i1, j1;
-        nsresult rv, r;
-        a1=100; b1=200; c1=300; d1=400; e1=500; f1=600; g1=700; h1=800; i1=900; j1=1000;
-        LOG(("NestedLoop: TEST 10_2: Entry: [%g, %g, %g, %g, %g, %g, %g, %g, %g, %g] => \n", a1, b1, c1, d1, e1, f1, g1, h1, i1, j1));
-        printf("NestedLoop: TEST 10_2: Entry: [%g, %g, %g, %g, %g, %g, %g, %g, %g, %g] => \n", a1, b1, c1, d1, e1, f1, g1, h1, i1, j1);
-        rv = proxyObject->Test10_2(&a1, &b1, &c1, &d1, &e1, &f1, &g1, &h1, &i1, &j1, &r);
-        LOG(("NestedLoop: TEST 10_2: Return:                                         => [%g, %g, %g, %g, %g, %g, %g, %g, %g, %g] --> Returns %d, rv=%d\n", a1, b1, c1, d1, e1, f1, g1, h1, i1, j1, r, rv));
-        printf("NestedLoop: TEST 10_2: Return: => [%g, %g, %g, %g, %g, %g, %g, %g, %g, %g] --> Returns %d, rv=%d\n", a1, b1, c1, d1, e1, f1, g1, h1, i1, j1, r, rv);
-
-        a1=100; b1=200; c1=300; d1=400; e1=500; f1=600; g1=700; h1=800; i1=900;
-        LOG(("NestedLoop: TEST 9_2: Entry: [%g, %g, %g, %g, %g, %g, %g, %g, %g] => \n", a1, b1, c1, d1, e1, f1, g1, h1, i1));
-        printf("NestedLoop: TEST 9_2: Entry: [%g, %g, %g, %g, %g, %g, %g, %g, %g] => \n", a1, b1, c1, d1, e1, f1, g1, h1, i1);
-        rv = proxyObject->Test9_2(&a1, &b1, &c1, &d1, &e1, &f1, &g1, &h1, &i1, &r);
-        LOG(("NestedLoop: TEST 9_2: Return:                                         => [%g, %g, %g, %g, %g, %g, %g, %g, %g] --> Returns %d, rv=%d\n", a1, b1, c1, d1, e1, f1, g1, h1, i1, r, rv));
-        printf("NestedLoop: TEST 9_2: Return: => [%g, %g, %g, %g, %g, %g, %g, %g, %g] --> Returns %d, rv=%d\n", a1, b1, c1, d1, e1, f1, g1, h1, i1, r, rv);
-
-        a1=100; b1=200; c1=300; d1=400; e1=500; f1=600; g1=700; h1=800;
-        LOG(("NestedLoop: TEST 8_2: Entry: [%g, %g, %g, %g, %g, %g, %g, %g] => \n", a1, b1, c1, d1, e1, f1, g1, h1));
-        printf("NestedLoop: TEST 8_2: Entry: [%g, %g, %g, %g, %g, %g, %g, %g] => \n", a1, b1, c1, d1, e1, f1, g1, h1);
-        rv = proxyObject->Test8_2(&a1, &b1, &c1, &d1, &e1, &f1, &g1, &h1, &r);
-        LOG(("NestedLoop: TEST 8_2: Return:                                         => [%g, %g, %g, %g, %g, %g, %g, %g] --> Returns %d, rv=%d\n", a1, b1, c1, d1, e1, f1, g1, h1, r, rv));
-        printf("NestedLoop: TEST 8_2: Return: => [%g, %g, %g, %g, %g, %g, %g, %g] --> Returns %d, rv=%d\n", a1, b1, c1, d1, e1, f1, g1, h1, r, rv);
-
-        a1=100; b1=200; c1=300; d1=400; e1=500; f1=600; g1=700;
-        LOG(("NestedLoop: TEST 7_2: Entry: [%g, %g, %g, %g, %g, %g, %g] => \n", a1, b1, c1, d1, e1, f1, g1));
-        printf("NestedLoop: TEST 7_2: Entry: [%g, %g, %g, %g, %g, %g, %g] => \n", a1, b1, c1, d1, e1, f1, g1);
-        rv = proxyObject->Test7_2(&a1, &b1, &c1, &d1, &e1, &f1, &g1, &r);
-        LOG(("NestedLoop: TEST 7_2: Return:                                         => [%g, %g, %g, %g, %g, %g, %g] --> Returns %d, rv=%d\n", a1, b1, c1, d1, e1, f1, g1, r, rv));
-        printf("NestedLoop: TEST 7_2: Return: => [%g, %g, %g, %g, %g, %g, %g] --> Returns %d, rv=%d\n", a1, b1, c1, d1, e1, f1, g1, r, rv);
-
-        a1=100; b1=200; c1=300; d1=400; e1=500; f1=600;
-        LOG(("NestedLoop: TEST 6_2: Entry: [%g, %g, %g, %g, %g, %g] => \n", a1, b1, c1, d1, e1, f1));
-        printf("NestedLoop: TEST 6_2: Entry: [%g, %g, %g, %g, %g, %g] => \n", a1, b1, c1, d1, e1, f1);
-        rv = proxyObject->Test6_2(&a1, &b1, &c1, &d1, &e1, &f1, &r);
-        LOG(("NestedLoop: TEST 6_2: Return:                                         => [%g, %g, %g, %g, %g, %g] --> Returns %d, rv=%d\n", a1, b1, c1, d1, e1, f1, r, rv));
-        printf("NestedLoop: TEST 6_2: Return: => [%g, %g, %g, %g, %g, %g] --> Returns %d, rv=%d\n", a1, b1, c1, d1, e1, f1, r, rv);
-
-        a1=100; b1=200; c1=300; d1=400; e1=500;
-        LOG(("NestedLoop: TEST 5_2: Entry: [%g, %g, %g, %g, %g] => \n", a1, b1, c1, d1, e1));
-        printf("NestedLoop: TEST 5_2: Entry: [%g, %g, %g, %g, %g] => \n", a1, b1, c1, d1, e1);
-        rv = proxyObject->Test5_2(&a1, &b1, &c1, &d1, &e1, &r);
-        LOG(("NestedLoop: TEST 5_2: Return:                                         => [%g, %g, %g, %g, %g] --> Returns %d, rv=%d\n", a1, b1, c1, d1, e1, r, rv));
-        printf("NestedLoop: TEST 5_2: Return: => [%g, %g, %g, %g, %g] --> Returns %d, rv=%d\n", a1, b1, c1, d1, e1, r, rv);
-
-        a1=100; b1=200; c1=300; d1=400;
-        LOG(("NestedLoop: TEST 4_2: Entry: [%g, %g, %g, %g] => \n", a1, b1, c1, d1));
-        printf("NestedLoop: TEST 4_2: Entry: [%g, %g, %g, %g] => \n", a1, b1, c1, d1);
-        rv = proxyObject->Test4_2(&a1, &b1, &c1, &d1, &r);
-        LOG(("NestedLoop: TEST 4_2: Return:                                         => [%g, %g, %g, %g] --> Returns %d, rv=%d\n", a1, b1, c1, d1, r, rv));
-        printf("NestedLoop: TEST 4_2: Return: => [%g, %g, %g, %g] --> Returns %d, rv=%d\n", a1, b1, c1, d1, r, rv);
-
-        a1=100; b1=200; c1=300;
-        LOG(("NestedLoop: TEST 3_2: Entry: [%g, %g, %g] => \n", a1, b1, c1));
-        printf("NestedLoop: TEST 3_2: Entry: [%g, %g, %g] => \n", a1, b1, c1);
-        rv = proxyObject->Test3_2(&a1, &b1, &c1, &r);
-        LOG(("NestedLoop: TEST 3_2: Return:                                         => [%g, %g, %g] --> Returns %d, rv=%d\n", a1, b1, c1, r, rv));
-        printf("NestedLoop: TEST 3_2: Return: => [%g, %g, %g] --> Returns %d, rv=%d\n", a1, b1, c1, r, rv);
-
-        a1=100; b1=200;
-        LOG(("NestedLoop: TEST 2_2: Entry: [%g, %g] => \n", a1, b1));
-        printf("NestedLoop: TEST 2_2: Entry: [%g, %g] => \n", a1, b1);
-        rv = proxyObject->Test2_2(&a1, &b1, &r);
-        LOG(("NestedLoop: TEST 2_2: Return:                                         => [%g, %g] --> Returns %d, rv=%d\n", a1, b1, r, rv));
-        printf("NestedLoop: TEST 2_2: Return: => [%g, %g] --> Returns %d, rv=%d\n", a1, b1, r, rv);
-
-        a1=100;
-        LOG(("NestedLoop: TEST 1_2: Entry: [%g] => \n", a1));
-        printf("NestedLoop: TEST 1_2: Entry: [%g] => \n", a1);
-        rv = proxyObject->Test1_2(&a1, &r);
-        LOG(("NestedLoop: TEST 1_2: Return:                                         => [%g] --> Returns %d, rv=%d\n", a1, r, rv));
-        printf("NestedLoop: TEST 1_2: Return: => [%g] --> Returns %d, rv=%d\n", a1, r, rv);
-}
-
-
-void TestCase_3_ProxyTests(nsITestProxy *proxyObject)
-{
-        float a1, b1, c1, d1, e1, f1, g1, h1, i1, j1;
-        nsresult rv, r;
-        a1=10.0; b1=20.0; c1=30.0; d1=40.0; e1=50.0; f1=60.0; g1=70.0; h1=80.0; i1=90.0; j1=100.0;
-        LOG(("NestedLoop: TEST 10_3: Entry: [%lf, %lf, %lf, %lf, %lf, %lf, %lf, %lf, %lf, %lf] => \n", a1, b1, c1, d1, e1, f1, g1, h1, i1, j1));
-        printf("NestedLoop: TEST 10_3: Entry: [%lf, %lf, %lf, %lf, %lf, %lf, %lf, %lf, %lf, %lf] => \n", a1, b1, c1, d1, e1, f1, g1, h1, i1, j1);
-        rv = proxyObject->Test10_3(&a1, &b1, &c1, &d1, &e1, &f1, &g1, &h1, &i1, &j1, &r);
-        LOG(("NestedLoop: TEST 10_3: Return:                                         => [%lf, %lf, %lf, %lf, %lf, %lf, %lf, %lf, %lf, %lf] --> Returns %d, rv=%d\n", a1, b1, c1, d1, e1, f1, g1, h1, i1, j1, r, rv));
-        printf("NestedLoop: TEST 10_3: Return: => [%lf, %lf, %lf, %lf, %lf, %lf, %lf, %lf, %lf, %lf] --> Returns %d, rv=%d\n", a1, b1, c1, d1, e1, f1, g1, h1, i1, j1, r, rv);
-
-        a1=10.0; b1=20.0; c1=30.0; d1=40.0; e1=50.0; f1=60.0; g1=70.0; h1=80.0; i1=90.0;
-        LOG(("NestedLoop: TEST 9_3: Entry: [%lf, %lf, %lf, %lf, %lf, %lf, %lf, %lf, %lf] => \n", a1, b1, c1, d1, e1, f1, g1, h1, i1));
-        printf("NestedLoop: TEST 9_3: Entry: [%lf, %lf, %lf, %lf, %lf, %lf, %lf, %lf, %lf] => \n", a1, b1, c1, d1, e1, f1, g1, h1, i1);
-        rv = proxyObject->Test9_3(&a1, &b1, &c1, &d1, &e1, &f1, &g1, &h1, &i1, &r);
-        LOG(("NestedLoop: TEST 9_3: Return:                                         => [%lf, %lf, %lf, %lf, %lf, %lf, %lf, %lf, %lf] --> Returns %d, rv=%d\n", a1, b1, c1, d1, e1, f1, g1, h1, i1, r, rv));
-        printf("NestedLoop: TEST 9_3: Return: => [%lf, %lf, %lf, %lf, %lf, %lf, %lf, %lf, %lf] --> Returns %d, rv=%d\n", a1, b1, c1, d1, e1, f1, g1, h1, i1, r, rv);
-
-        a1=10.0; b1=20.0; c1=30.0; d1=40.0; e1=50.0; f1=60.0; g1=70.0; h1=80.0;
-        LOG(("NestedLoop: TEST 8_3: Entry: [%lf, %lf, %lf, %lf, %lf, %lf, %lf, %lf] => \n", a1, b1, c1, d1, e1, f1, g1, h1));
-        printf("NestedLoop: TEST 8_3: Entry: [%lf, %lf, %lf, %lf, %lf, %lf, %lf, %lf] => \n", a1, b1, c1, d1, e1, f1, g1, h1);
-        rv = proxyObject->Test8_3(&a1, &b1, &c1, &d1, &e1, &f1, &g1, &h1, &r);
-        LOG(("NestedLoop: TEST 8_3: Return:                                         => [%lf, %lf, %lf, %lf, %lf, %lf, %lf, %lf] --> Returns %d, rv=%d\n", a1, b1, c1, d1, e1, f1, g1, h1, r, rv));
-        printf("NestedLoop: TEST 8_3: Return: => [%lf, %lf, %lf, %lf, %lf, %lf, %lf, %lf] --> Returns %d, rv=%d\n", a1, b1, c1, d1, e1, f1, g1, h1, r, rv);
-
-        a1=10.0; b1=20.0; c1=30.0; d1=40.0; e1=50.0; f1=60.0; g1=70.0;
-        LOG(("NestedLoop: TEST 7_3: Entry: [%lf, %lf, %lf, %lf, %lf, %lf, %lf] => \n", a1, b1, c1, d1, e1, f1, g1));
-        printf("NestedLoop: TEST 7_3: Entry: [%lf, %lf, %lf, %lf, %lf, %lf, %lf] => \n", a1, b1, c1, d1, e1, f1, g1);
-        rv = proxyObject->Test7_3(&a1, &b1, &c1, &d1, &e1, &f1, &g1, &r);
-        LOG(("NestedLoop: TEST 7_3: Return:                                         => [%lf, %lf, %lf, %lf, %lf, %lf, %lf] --> Returns %d, rv=%d\n", a1, b1, c1, d1, e1, f1, g1, r, rv));
-        printf("NestedLoop: TEST 7_3: Return: => [%lf, %lf, %lf, %lf, %lf, %lf, %lf] --> Returns %d, rv=%d\n", a1, b1, c1, d1, e1, f1, g1, r, rv);
-
-        a1=10.0; b1=20.0; c1=30.0; d1=40.0; e1=50.0; f1=60.0;
-        LOG(("NestedLoop: TEST 6_3: Entry: [%lf, %lf, %lf, %lf, %lf, %lf] => \n", a1, b1, c1, d1, e1, f1));
-        printf("NestedLoop: TEST 6_3: Entry: [%lf, %lf, %lf, %lf, %lf, %lf] => \n", a1, b1, c1, d1, e1, f1);
-        rv = proxyObject->Test6_3(&a1, &b1, &c1, &d1, &e1, &f1, &r);
-        LOG(("NestedLoop: TEST 6_3: Return:                                         => [%lf, %lf, %lf, %lf, %lf, %lf] --> Returns %d, rv=%d\n", a1, b1, c1, d1, e1, f1, r, rv));
-        printf("NestedLoop: TEST 6_3: Return: => [%lf, %lf, %lf, %lf, %lf, %lf] --> Returns %d, rv=%d\n", a1, b1, c1, d1, e1, f1, r, rv);
-
-        a1=10.0; b1=20.0; c1=30.0; d1=40.0; e1=50.0;
-        LOG(("NestedLoop: TEST 5_3: Entry: [%lf, %lf, %lf, %lf, %lf] => \n", a1, b1, c1, d1, e1));
-        printf("NestedLoop: TEST 5_3: Entry: [%lf, %lf, %lf, %lf, %lf] => \n", a1, b1, c1, d1, e1);
-        rv = proxyObject->Test5_3(&a1, &b1, &c1, &d1, &e1, &r);
-        LOG(("NestedLoop: TEST 5_3: Return:                                         => [%lf, %lf, %lf, %lf, %lf] --> Returns %d, rv=%d\n", a1, b1, c1, d1, e1, r, rv));
-        printf("NestedLoop: TEST 5_3: Return: => [%lf, %lf, %lf, %lf, %lf] --> Returns %d, rv=%d\n", a1, b1, c1, d1, e1, r, rv);
-
-        a1=10.0; b1=20.0; c1=30.0; d1=40.0;
-        LOG(("NestedLoop: TEST 4_3: Entry: [%lf, %lf, %lf, %lf] => \n", a1, b1, c1, d1));
-        printf("NestedLoop: TEST 4_3: Entry: [%lf, %lf, %lf, %lf] => \n", a1, b1, c1, d1);
-        rv = proxyObject->Test4_3(&a1, &b1, &c1, &d1, &r);
-        LOG(("NestedLoop: TEST 4_3: Return:                                         => [%lf, %lf, %lf, %lf] --> Returns %d, rv=%d\n", a1, b1, c1, d1, r, rv));
-        printf("NestedLoop: TEST 4_3: Return: => [%lf, %lf, %lf, %lf] --> Returns %d, rv=%d\n", a1, b1, c1, d1, r, rv);
-
-        a1=10.0; b1=20.0; c1=30.0;
-        LOG(("NestedLoop: TEST 3_3: Entry: [%lf, %lf, %lf] => \n", a1, b1, c1));
-        printf("NestedLoop: TEST 3_3: Entry: [%lf, %lf, %lf] => \n", a1, b1, c1);
-        rv = proxyObject->Test3_3(&a1, &b1, &c1, &r);
-        LOG(("NestedLoop: TEST 3_3: Return:                                         => [%lf, %lf, %lf] --> Returns %d, rv=%d\n", a1, b1, c1, r, rv));
-        printf("NestedLoop: TEST 3_3: Return: => [%lf, %lf, %lf] --> Returns %d, rv=%d\n", a1, b1, c1, r, rv);
-
-        a1=10.0; b1=20.0;
-        LOG(("NestedLoop: TEST 2_3: Entry: [%lf, %lf] => \n", a1, b1));
-        printf("NestedLoop: TEST 2_3: Entry: [%lf, %lf] => \n", a1, b1);
-        rv = proxyObject->Test2_3(&a1, &b1, &r);
-        LOG(("NestedLoop: TEST 2_3: Return:                                         => [%lf, %lf] --> Returns %d, rv=%d\n", a1, b1, r, rv));
-        printf("NestedLoop: TEST 2_3: Return: => [%lf, %lf] --> Returns %d, rv=%d\n", a1, b1, r, rv);
-
-        a1=10.0;
-        LOG(("NestedLoop: TEST 1_3: Entry: [%lf] => \n", a1));
-        printf("NestedLoop: TEST 1_3: Entry: [%lf] => \n", a1);
-        rv = proxyObject->Test1_3(&a1, &r);
-        LOG(("NestedLoop: TEST 1_3: Return:                                         => [%lf] --> Returns %d, rv=%d\n", a1, r, rv));
-        printf("NestedLoop: TEST 1_3: Return: => [%lf] --> Returns %d, rv=%d\n", a1, r, rv);
-}
-
-
-void TestCase_4_ProxyTests(nsITestProxy *proxyObject)
-{
-        double a1, b1, c1, d1, e1, f1, g1, h1, i1, j1;
-        nsresult rv, r;
-        a1=100.0; b1=200.0; c1=300.0; d1=400.0; e1=500.0; f1=600.0; g1=700.0; h1=800.0; i1=900.0; j1=1000.0;
-        LOG(("NestedLoop: TEST 10_4: Entry: [%le, %le, %le, %le, %le, %le, %le, %le, %le, %le] => \n", a1, b1, c1, d1, e1, f1, g1, h1, i1, j1));
-        printf("NestedLoop: TEST 10_4: Entry: [%le, %le, %le, %le, %le, %le, %le, %le, %le, %le] => \n", a1, b1, c1, d1, e1, f1, g1, h1, i1, j1);
-        rv = proxyObject->Test10_4(&a1, &b1, &c1, &d1, &e1, &f1, &g1, &h1, &i1, &j1, &r);
-        LOG(("NestedLoop: TEST 10_4: Return:                                         => [%le, %le, %le, %le, %le, %le, %le, %le, %le, %le] --> Returns %d, rv=%d\n", a1, b1, c1, d1, e1, f1, g1, h1, i1, j1, r, rv));
-        printf("NestedLoop: TEST 10_4: Return: => [%le, %le, %le, %le, %le, %le, %le, %le, %le, %le] --> Returns %d, rv=%d\n", a1, b1, c1, d1, e1, f1, g1, h1, i1, j1, r, rv);
-
-        a1=100.0; b1=200.0; c1=300.0; d1=400.0; e1=500.0; f1=600.0; g1=700.0; h1=800.0; i1=900.0;
-        LOG(("NestedLoop: TEST 9_4: Entry: [%le, %le, %le, %le, %le, %le, %le, %le, %le] => \n", a1, b1, c1, d1, e1, f1, g1, h1, i1));
-        printf("NestedLoop: TEST 9_4: Entry: [%le, %le, %le, %le, %le, %le, %le, %le, %le] => \n", a1, b1, c1, d1, e1, f1, g1, h1, i1);
-        rv = proxyObject->Test9_4(&a1, &b1, &c1, &d1, &e1, &f1, &g1, &h1, &i1, &r);
-        LOG(("NestedLoop: TEST 9_4: Return:                                         => [%le, %le, %le, %le, %le, %le, %le, %le, %le] --> Returns %d, rv=%d\n", a1, b1, c1, d1, e1, f1, g1, h1, i1, r, rv));
-        printf("NestedLoop: TEST 9_4: Return: => [%le, %le, %le, %le, %le, %le, %le, %le, %le] --> Returns %d, rv=%d\n", a1, b1, c1, d1, e1, f1, g1, h1, i1, r, rv);
-
-        a1=100.0; b1=200.0; c1=300.0; d1=400.0; e1=500.0; f1=600.0; g1=700.0; h1=800.0;
-        LOG(("NestedLoop: TEST 8_4: Entry: [%le, %le, %le, %le, %le, %le, %le, %le] => \n", a1, b1, c1, d1, e1, f1, g1, h1));
-        printf("NestedLoop: TEST 8_4: Entry: [%le, %le, %le, %le, %le, %le, %le, %le] => \n", a1, b1, c1, d1, e1, f1, g1, h1);
-        rv = proxyObject->Test8_4(&a1, &b1, &c1, &d1, &e1, &f1, &g1, &h1, &r);
-        LOG(("NestedLoop: TEST 8_4: Return:                                         => [%le, %le, %le, %le, %le, %le, %le, %le] --> Returns %d, rv=%d\n", a1, b1, c1, d1, e1, f1, g1, h1, r, rv));
-        printf("NestedLoop: TEST 8_4: Return: => [%le, %le, %le, %le, %le, %le, %le, %le] --> Returns %d, rv=%d\n", a1, b1, c1, d1, e1, f1, g1, h1, r, rv);
-
-        a1=100.0; b1=200.0; c1=300.0; d1=400.0; e1=500.0; f1=600.0; g1=700.0;
-        LOG(("NestedLoop: TEST 7_4: Entry: [%le, %le, %le, %le, %le, %le, %le] => \n", a1, b1, c1, d1, e1, f1, g1));
-        printf("NestedLoop: TEST 7_4: Entry: [%le, %le, %le, %le, %le, %le, %le] => \n", a1, b1, c1, d1, e1, f1, g1);
-        rv = proxyObject->Test7_4(&a1, &b1, &c1, &d1, &e1, &f1, &g1, &r);
-        LOG(("NestedLoop: TEST 7_4: Return:                                         => [%le, %le, %le, %le, %le, %le, %le] --> Returns %d, rv=%d\n", a1, b1, c1, d1, e1, f1, g1, r, rv));
-        printf("NestedLoop: TEST 7_4: Return: => [%le, %le, %le, %le, %le, %le, %le] --> Returns %d, rv=%d\n", a1, b1, c1, d1, e1, f1, g1, r, rv);
-
-        a1=100.0; b1=200.0; c1=300.0; d1=400.0; e1=500.0; f1=600.0;
-        LOG(("NestedLoop: TEST 6_4: Entry: [%le, %le, %le, %le, %le, %le] => \n", a1, b1, c1, d1, e1, f1));
-        printf("NestedLoop: TEST 6_4: Entry: [%le, %le, %le, %le, %le, %le] => \n", a1, b1, c1, d1, e1, f1);
-        rv = proxyObject->Test6_4(&a1, &b1, &c1, &d1, &e1, &f1, &r);
-        LOG(("NestedLoop: TEST 6_4: Return:                                         => [%le, %le, %le, %le, %le, %le] --> Returns %d, rv=%d\n", a1, b1, c1, d1, e1, f1, r, rv));
-        printf("NestedLoop: TEST 6_4: Return: => [%le, %le, %le, %le, %le, %le] --> Returns %d, rv=%d\n", a1, b1, c1, d1, e1, f1, r, rv);
-
-        a1=100.0; b1=200.0; c1=300.0; d1=400.0; e1=500.0;
-        LOG(("NestedLoop: TEST 5_4: Entry: [%le, %le, %le, %le, %le] => \n", a1, b1, c1, d1, e1));
-        printf("NestedLoop: TEST 5_4: Entry: [%le, %le, %le, %le, %le] => \n", a1, b1, c1, d1, e1);
-        rv = proxyObject->Test5_4(&a1, &b1, &c1, &d1, &e1, &r);
-        LOG(("NestedLoop: TEST 5_4: Return:                                         => [%le, %le, %le, %le, %le] --> Returns %d, rv=%d\n", a1, b1, c1, d1, e1, r, rv));
-        printf("NestedLoop: TEST 5_4: Return: => [%le, %le, %le, %le, %le] --> Returns %d, rv=%d\n", a1, b1, c1, d1, e1, r, rv);
-
-        a1=100.0; b1=200.0; c1=300.0; d1=400.0;
-        LOG(("NestedLoop: TEST 4_4: Entry: [%le, %le, %le, %le] => \n", a1, b1, c1, d1));
-        printf("NestedLoop: TEST 4_4: Entry: [%le, %le, %le, %le] => \n", a1, b1, c1, d1);
-        rv = proxyObject->Test4_4(&a1, &b1, &c1, &d1, &r);
-        LOG(("NestedLoop: TEST 4_4: Return:                                         => [%le, %le, %le, %le] --> Returns %d, rv=%d\n", a1, b1, c1, d1, r, rv));
-        printf("NestedLoop: TEST 4_4: Return: => [%le, %le, %le, %le] --> Returns %d, rv=%d\n", a1, b1, c1, d1, r, rv);
-
-        a1=100.0; b1=200.0; c1=300.0;
-        LOG(("NestedLoop: TEST 3_4: Entry: [%le, %le, %le] => \n", a1, b1, c1));
-        printf("NestedLoop: TEST 3_4: Entry: [%le, %le, %le] => \n", a1, b1, c1);
-        rv = proxyObject->Test3_4(&a1, &b1, &c1, &r);
-        LOG(("NestedLoop: TEST 3_4: Return:                                         => [%le, %le, %le] --> Returns %d, rv=%d\n", a1, b1, c1, r, rv));
-        printf("NestedLoop: TEST 3_4: Return: => [%le, %le, %le] --> Returns %d, rv=%d\n", a1, b1, c1, r, rv);
-
-        a1=100.0; b1=200.0;
-        LOG(("NestedLoop: TEST 2_4: Entry: [%le, %le] => \n", a1, b1));
-        printf("NestedLoop: TEST 2_4: Entry: [%le, %le] => \n", a1, b1);
-        rv = proxyObject->Test2_4(&a1, &b1, &r);
-        LOG(("NestedLoop: TEST 2_4: Return:                                         => [%le, %le] --> Returns %d, rv=%d\n", a1, b1, r, rv));
-        printf("NestedLoop: TEST 2_4: Return: => [%le, %le] --> Returns %d, rv=%d\n", a1, b1, r, rv);
-
-        a1=100.0;
-        LOG(("NestedLoop: TEST 1_4: Entry: [%le] => \n", a1));
-        printf("NestedLoop: TEST 1_4: Entry: [%le] => \n", a1);
-        rv = proxyObject->Test1_4(&a1, &r);
-        LOG(("NestedLoop: TEST 1_4: Return:                                         => [%le] --> Returns %d, rv=%d\n", a1, r, rv));
-        printf("NestedLoop: TEST 1_4: Return: => [%le] --> Returns %d, rv=%d\n", a1, r, rv);
-}
-
-
-void TestCase_5_ProxyTests(nsITestProxy *proxyObject)
-{
-        //nsITestProxy *p1, *p2, *p3, *p4, *p5, *p6, *p7, *p8, *p9, *p10;
-        nsISupports *p1, *p2, *p3, *p4, *p5, *p6, *p7, *p8, *p9, *p10;
-        p1 = p2 = p3 = p4 = p5 = p6 = p7 = p8 = p9 = p10 = NULL;
-        nsresult rv, r;
-
-        printf("\n\nNestedLoop: TestCase_5_ProxyTests: **** NOTE **** You can verify that the sub-tests of TEST 1_5 worked by looking at the \\NSPR.LOG file on your device!\n\n");
-
-        LOG(("NestedLoop: TEST 1_5: Entry: [0x%08X] => \n",
-             p1));
-        printf("NestedLoop: TEST 1_5: Entry: [0x%08X] => \n",
-             p1);
-        rv = proxyObject->Test1_5(&p1, &r);
-        LOG(("NestedLoop: TEST 1_5: Return:                                         => [0x%08X] --> Returns %d, rv=%d\n",
-             p1, r, rv));
-        printf("NestedLoop: TEST 1_5: Return: => [0x%08X] --> Returns %d, rv=%d\n",
-             p1, r, rv);
-
-        LOG(("NestedLoop: TEST 2_5: Entry: [0x%08X, 0x%08X] => \n",
-             p1, p2));
-        printf("NestedLoop: TEST 2_5: Entry: [0x%08X, 0x%08X] => \n",
-             p1, p2);
-        rv = proxyObject->Test2_5(&p1, &p2, &r);
-        LOG(("NestedLoop: TEST 2_5: Return:                                         => [0x%08X, 0x%08X] --> Returns %d, rv=%d\n",
-             p1, p2, r, rv));
-        printf("NestedLoop: TEST 2_5: Return: => [0x%08X, 0x%08X] --> Returns %d, rv=%d\n",
-             p1, p2, r, rv);
-
-        LOG(("NestedLoop: TEST 3_5: Entry: [0x%08X, 0x%08X, 0x%08X] => \n",
-             p1, p2, p3));
-        printf("NestedLoop: TEST 3_5: Entry: [0x%08X, 0x%08X, 0x%08X] => \n",
-             p1, p2, p3);
-        rv = proxyObject->Test3_5(&p1, &p2, &p3, &r);
-        LOG(("NestedLoop: TEST 3_5: Return:                                         => [0x%08X, 0x%08X, 0x%08X] --> Returns %d, rv=%d\n",
-             p1, p2, p3, r, rv));
-        printf("NestedLoop: TEST 3_5: Return: => [0x%08X, 0x%08X, 0x%08X] --> Returns %d, rv=%d\n",
-             p1, p2, p3, r, rv);
-
-        LOG(("NestedLoop: TEST 4_5: Entry: [0x%08X, 0x%08X, 0x%08X, 0x%08X] => \n",
-             p1, p2, p3, p4));
-        printf("NestedLoop: TEST 4_5: Entry: [0x%08X, 0x%08X, 0x%08X, 0x%08X] => \n",
-             p1, p2, p3, p4);
-        rv = proxyObject->Test4_5(&p1, &p2, &p3, &p4, &r);
-        LOG(("NestedLoop: TEST 4_5: Return:                                         => [0x%08X, 0x%08X, 0x%08X, 0x%08X] --> Returns %d, rv=%d\n",
-             p1, p2, p3, p4, r, rv));
-        printf("NestedLoop: TEST 4_5: Return: => [0x%08X, 0x%08X, 0x%08X, 0x%08X] --> Returns %d, rv=%d\n",
-             p1, p2, p3, p4, r, rv);
-
-        LOG(("NestedLoop: TEST 5_5: Entry: [0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X] => \n",
-             p1, p2, p3, p4, p5));
-        printf("NestedLoop: TEST 5_5: Entry: [0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X] => \n",
-             p1, p2, p3, p4, p5);
-        rv = proxyObject->Test5_5(&p1, &p2, &p3, &p4, &p5, &r);
-        LOG(("NestedLoop: TEST 5_5: Return:                                         => [0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X] --> Returns %d, rv=%d\n",
-             p1, p2, p3, p4, p5, r, rv));
-        printf("NestedLoop: TEST 5_5: Return: => [0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X] --> Returns %d, rv=%d\n",
-             p1, p2, p3, p4, p5, r, rv);
-
-        LOG(("NestedLoop: TEST 6_5: Entry: [0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X] => \n",
-             p1, p2, p3, p4, p5, p6));
-        printf("NestedLoop: TEST 6_5: Entry: [0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X] => \n",
-             p1, p2, p3, p4, p5, p6);
-        rv = proxyObject->Test6_5(&p1, &p2, &p3, &p4, &p5, &p6, &r);
-        LOG(("NestedLoop: TEST 6_5: Return:                                         => [0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X] --> Returns %d, rv=%d\n",
-             p1, p2, p3, p4, p5, p6, r, rv));
-        printf("NestedLoop: TEST 6_5: Return: => [0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X] --> Returns %d, rv=%d\n",
-             p1, p2, p3, p4, p5, p6, r, rv);
-
-        LOG(("NestedLoop: TEST 7_5: Entry: [0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X] => \n",
-             p1, p2, p3, p4, p5, p6, p7));
-        printf("NestedLoop: TEST 7_5: Entry: [0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X] => \n",
-             p1, p2, p3, p4, p5, p6, p7);
-        rv = proxyObject->Test7_5(&p1, &p2, &p3, &p4, &p5, &p6, &p7, &r);
-        LOG(("NestedLoop: TEST 7_5: Return:                                         => [0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X] --> Returns %d, rv=%d\n",
-             p1, p2, p3, p4, p5, p6, p7, r, rv));
-        printf("NestedLoop: TEST 7_5: Return: => [0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X] --> Returns %d, rv=%d\n",
-             p1, p2, p3, p4, p5, p6, p7, r, rv);
-
-        LOG(("NestedLoop: TEST 8_5: Entry: [0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X] => \n",
-             p1, p2, p3, p4, p5, p6, p7, p8));
-        printf("NestedLoop: TEST 8_5: Entry: [0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X] => \n",
-             p1, p2, p3, p4, p5, p6, p7, p8);
-        rv = proxyObject->Test8_5(&p1, &p2, &p3, &p4, &p5, &p6, &p7, &p8, &r);
-        LOG(("NestedLoop: TEST 8_5: Return:                                         => [0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X] --> Returns %d, rv=%d\n",
-             p1, p2, p3, p4, p5, p6, p7, p8, r, rv));
-        printf("NestedLoop: TEST 8_5: Return: => [0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X] --> Returns %d, rv=%d\n",
-             p1, p2, p3, p4, p5, p6, p7, p8, r, rv);
-
-        LOG(("NestedLoop: TEST 9_5: Entry: [0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X] => \n",
-             p1, p2, p3, p4, p5, p6, p7, p8, p9));
-        printf("NestedLoop: TEST 9_5: Entry: [0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X] => \n",
-             p1, p2, p3, p4, p5, p6, p7, p8, p9);
-        rv = proxyObject->Test9_5(&p1, &p2, &p3, &p4, &p5, &p6, &p7, &p8, &p9, &r);
-        LOG(("NestedLoop: TEST 9_5: Return:                                         => [0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X] --> Returns %d, rv=%d\n",
-             p1, p2, p3, p4, p5, p6, p7, p8, p9, r, rv));
-        printf("NestedLoop: TEST 9_5: Return: => [0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X] --> Returns %d, rv=%d\n",
-             p1, p2, p3, p4, p5, p6, p7, p8, p9, r, rv);
-
-        LOG(("NestedLoop: TEST 10_5: Entry: [0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X] => \n",
-             p1, p2, p3, p4, p5, p6, p7, p8, p9, p10));
-        printf("NestedLoop: TEST 10_5: Entry: [0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X] => \n",
-             p1, p2, p3, p4, p5, p6, p7, p8, p9, p10);
-        rv = proxyObject->Test10_5(&p1, &p2, &p3, &p4, &p5, &p6, &p7, &p8, &p9, &p10, &r);
-        LOG(("NestedLoop: TEST 10_5: Return:                                         => [0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X] --> Returns %d, rv=%d\n",
-             p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, r, rv));
-        printf("NestedLoop: TEST 10_5: Return: => [0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X] --> Returns %d, rv=%d\n",
-             p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, r, rv);
-
-        NS_RELEASE(p10);
-        NS_RELEASE(p9);
-        NS_RELEASE(p8);
-        NS_RELEASE(p7);
-        NS_RELEASE(p6);
-        NS_RELEASE(p5);
-        NS_RELEASE(p4);
-        NS_RELEASE(p3);
-        NS_RELEASE(p2);
-        NS_RELEASE(p1);
-}
-
 
 void TestCase_NestedLoop(nsIThread *thread, PRInt32 index)
 {
     nsCOMPtr<nsIProxyObjectManager> manager =
             do_GetService(NS_XPCOMPROXY_CONTRACTID);
 
-    LOG(("NestedLoop: ProxyObjectManager: %p\n", (void *) manager.get()));
+    LOG(("TEST: ProxyObjectManager: %p\n", (void *) manager.get()));
     
     PR_ASSERT(manager);
 
     nsITestProxy         *proxyObject;
-    nsTestXPCFoo*         foo   = new nsTestXPCFoo();
+    nsTestXPCFoo2*        foo   = new nsTestXPCFoo2();
     
     PR_ASSERT(foo);
     
-    TestCase_1_DirectTests(foo);
     
     manager->GetProxyForObject(thread, NS_GET_IID(nsITestProxy), foo, NS_PROXY_SYNC, (void**)&proxyObject);
     
     if (proxyObject)
     {
         // release ownership of the real object. 
         
         nsresult rv;
         
-        LOG(("NestedLoop: Deleting real Object (%d)\n", index));
+        LOG(("TEST: Deleting real Object (%d)\n", index));
         NS_RELEASE(foo);
    
         PRInt32 retval;
         
-        LOG(("NestedLoop: Getting EventThread...\n"));
+        LOG(("TEST: Getting EventThread...\n"));
 
         //nsCOMPtr<nsIThread> curThread = do_GetCurrentThread();
         PRThread *curThread = PR_GetCurrentThread();
         if (curThread)
         {
-            LOG(("NestedLoop: Thread (%d) Prior to calling proxyObject->Test.\n", index));
+            LOG(("TEST: Thread (%d) Prior to calling proxyObject->Test.\n", index));
             rv = proxyObject->Test(NS_PTR_TO_INT32((void*)curThread), 0, &retval);   // XXX broken on 64-bit arch
-            LOG(("NestedLoop: Thread (%d) proxyObject error: %x.\n", index, rv));
-
-        } else {
-                LOG(("NestedLoop: No EventThread Found!\n"));
-        }
+            LOG(("TEST: Thread (%d) proxyObject error: %x.\n", index, rv));
 
-        TestCase_1_ProxyTests(proxyObject);
-        TestCase_2_ProxyTests(proxyObject);
-        TestCase_3_ProxyTests(proxyObject);
-        TestCase_4_ProxyTests(proxyObject);
-        TestCase_5_ProxyTests(proxyObject);
-
-        LOG(("NestedLoop: Deleting Proxy Object (%d)\n", index));
-        NS_RELEASE(proxyObject);
+            LOG(("TEST: Deleting Proxy Object (%d)\n", index));
+            NS_RELEASE(proxyObject);
+        }    
 
         PR_Sleep( PR_MillisecondsToInterval(1000) );  // If your thread goes away, your stack goes away.  Only use ASYNC on calls that do not have out parameters
     }
-    else
-    {
-        LOG(("NestedLoop: COULD NOT GET PROXY OBJECT!!!\n"));
-        printf("NestedLoop: COULD NOT GET PROXY OBJECT!!!\n");
-    }
 }
 
 
 #if 0
 void TestCase_nsISupports(void *arg)
 {
 
     ArgsStruct *argsStruct = (ArgsStruct*) arg;
@@ -877,19 +406,17 @@ public:
                 do_GetService(NS_XPCOMPROXY_CONTRACTID);
 
         manager->GetProxyForObject(thread,
                                    NS_GET_IID(nsITestProxy), foo,
                                    NS_PROXY_SYNC, (void**)&proxyObject);
 
         PRInt32 a;
         proxyObject->Test(1, 2, &a);
-
-        nsresult rv;
-        proxyObject->Test2(&rv);
+        proxyObject->Test2();
         
         NS_RELEASE(proxyObject);
         delete foo;
 
         LOG(("TEST: End of Verification calling Proxy on eventQ thread.\n"));
 
         return NS_OK;
     }
@@ -956,40 +483,43 @@ RunApartmentTest()
     }
 
     pool->Shutdown();
 
     LOG(("RunApartmentTest: end\n"));
     return NS_OK;
 }
 
+} // namespace
 
-int do_my_test(int numberOfThreads)
+using namespace proxytests;
+
+int
+main(int argc, char **argv)
 {
+    int numberOfThreads = 1;
 
-    if ( sLog == NULL )
-		sLog = PR_NewLogModule("Test");
+    if (argc > 1)
+        numberOfThreads = atoi(argv[1]);
 
     NS_InitXPCOM2(nsnull, nsnull, nsnull);
 
     // Scope code so everything is destroyed before we run call NS_ShutdownXPCOM
     {
         nsCOMPtr<nsIComponentRegistrar> registrar;
         NS_GetComponentRegistrar(getter_AddRefs(registrar));
         registrar->AutoRegister(nsnull);
 
-#if 0
-        TestCase_1_Failure();
-#else
+        RunApartmentTest();
+
         nsCOMPtr<nsIThread> eventLoopThread;
         NS_NewThread(getter_AddRefs(eventLoopThread));
 
-	nsCOMPtr<nsIRunnable> test;
-        //test = new TestSyncProxyToSelf();
-        //eventLoopThread->Dispatch(test, NS_DISPATCH_NORMAL);
+        nsCOMPtr<nsIRunnable> test = new TestSyncProxyToSelf();
+        eventLoopThread->Dispatch(test, NS_DISPATCH_NORMAL);
 
         PRThread *eventLoopPRThread;
         eventLoopThread->GetPRThread(&eventLoopPRThread);
         PR_ASSERT(eventLoopPRThread);
         
         LOG(("TEST: Spawn Threads:\n"));
         nsCOMArray<nsIThread> threads;
         for (PRInt32 spawn = 0; spawn < numberOfThreads; spawn++)
@@ -1013,48 +543,16 @@ int do_my_test(int numberOfThreads)
         {
             LOG(("TEST: Thread (%d) Join...\n", i));
             nsresult rv = threads[i]->Shutdown();
             LOG(("TEST: Thread (%d) Joined. (error: %x).\n", i, rv));
         }
 
         LOG(("TEST: Shutting down event loop thread\n"));
         eventLoopThread->Shutdown();
-#endif
-       
     }
 
     LOG(("TEST: Calling Cleanup.\n"));
     NS_ShutdownXPCOM(nsnull);
 
     LOG(("TEST: Return zero.\n"));
     return 0;
 }
-
-
-
-int
-   main(void *myThis, int argc, char **argv)
-{
-        int numberOfThreads = 1;
-
-        if (argc > 1)
-                numberOfThreads = atoi(argv[1]);
-
-        return do_my_test(numberOfThreads);
-}
-
-
-
-
-
-
-LRESULT APIENTRY wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdLine, int nCmdShow)
-{
-        do_my_test(1);
-        
-        return 0;
-}
-
-
-
-
-
deleted file mode 100644
--- a/xpcom/proxy/tests/testproxyclasses.cpp
+++ /dev/null
@@ -1,1619 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Pierre Phaneuf <pp@ludusdesign.com>
- *   John Wolfe <wolfe@lobo.us>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#include <stdio.h>
-
-#include "nsXPCOM.h"
-#include "nsXPCOMCIDInternal.h"
-#include "nsIComponentManager.h"
-#include "nsIComponentRegistrar.h"
-#include "nsIServiceManager.h"
-#include "nsAutoPtr.h"
-#include "nsCOMPtr.h"
-#include "nsCOMArray.h"
-
-#include "nscore.h"
-#include "nspr.h"
-#include "prmon.h"
-
-#include "nsITestProxy.h"
-
-#include "nsIRunnable.h"
-#include "nsIProxyObjectManager.h"
-#include "nsIThreadPool.h"
-#include "nsXPCOMCIDInternal.h"
-#include "nsComponentManagerUtils.h"
-#include "nsServiceManagerUtils.h"
-#include "nsThreadUtils.h"
-
-
-//#include "prlog.h"
-//#ifdef PR_LOGGING
-//extern PRLogModuleInfo *sLog = PR_NewLogModule("Test");
-//#define LOG(args) PR_LOG(sLog, PR_LOG_DEBUG, args)
-//#else
-//#define LOG(args) printf args
-//#endif
-
-
-
-/***************************************************************************/
-/* nsTestXPCFoo                                                            */
-/***************************************************************************/
-nsTestXPCFoo::nsTestXPCFoo()
-{
-	NS_ADDREF_THIS();
-}
-
-NS_IMPL_THREADSAFE_ISUPPORTS1(nsTestXPCFoo, nsITestProxy)
-
-NS_IMETHODIMP nsTestXPCFoo::Test(PRInt32 p1, PRInt32 p2, PRInt32 *_retval)
-{
-	LOG(("TEST: Thread (%d) Test Called successfully! Party on...\n", p1));
-	*_retval = p1+p2;
-	return NS_OK;
-}
-
-
-NS_IMETHODIMP nsTestXPCFoo::Test2(nsresult *_retval)
-{
-	LOG(("TEST: The quick brown netscape jumped over the old lazy ie..\n"));
-
-	return NS_OK;
-}
-
-NS_IMETHODIMP nsTestXPCFoo::Test3(nsISupports *p1, nsISupports **p2, nsresult *_retval)
-{
-	if (p1 != nsnull)
-	{
-		nsresult r;
-		nsITestProxy *test;
-
-		p1->QueryInterface(NS_GET_IID(nsITestProxy), (void**)&test);
-
-		test->Test2(&r);
-		PRInt32 a;
-		test->Test(1, 2, &a);
-		LOG(("TEST: \n1+2=%d\n",a));
-	}
-
-	*p2 = new nsTestXPCFoo();
-	return NS_OK;
-}
-
-
-
-
-NS_IMETHODIMP nsTestXPCFoo::Test1_1(PRInt32 *p1, nsresult *_retval)
-{
-	LOG(("TEST: 1_1: [%d] => ",
-	     *p1));
-
-	*p1 = *p1 + *p1;
-
-	LOG(("TEST: 1_1:                                          => [%d]\n",
-	     *p1));
-
-	*_retval = 1010;
-	return 1010;	//NS_OK;
-}
-
-NS_IMETHODIMP nsTestXPCFoo::Test1_2(PRInt64 *p1, nsresult *_retval)
-{
-	LOG(("TEST: 1_2: [%g] => ",
-	     *p1));
-
-	*p1 = *p1 + *p1;
-
-	LOG(("TEST: 1_2:                                                    => [%g]\n",
-	     *p1));
-
-	*_retval = 1020;
-	return 1020;	//NS_OK;
-}
-
-NS_IMETHODIMP nsTestXPCFoo::Test1_3(float *p1, nsresult *_retval)
-{
-	LOG(("TEST: 1_3: [%lf] => ",
-	     *p1));
-
-	*p1 = *p1 + *p1;
-
-	LOG(("TEST: 1_3:                                                    => [%lf]\n",
-	     *p1));
-
-	*_retval = 1030;
-	return 1030;	//NS_OK;
-}
-
-NS_IMETHODIMP nsTestXPCFoo::Test1_4(double *p1, nsresult *_retval)
-{
-	LOG(("TEST: 1_4: [%le] => ",
-	     *p1));
-
-	*p1 = *p1 + *p1;
-
-	LOG(("TEST: 1_4:                                                    => [%le]\n",
-	     *p1));
-
-	*_retval = 1040;
-	return 1040;	//NS_OK;
-}
-
-NS_IMETHODIMP nsTestXPCFoo::Test1_5(nsISupports **p1, nsresult *_retval)
-{
-	*p1 = new nsTestXPCFoo();
-
-	LOG(("TEST: 1_5:                                                    => [0x%08X]\n",
-	     *p1));
-
-	*_retval = 1050;
-	return 1050;	//NS_OK;
-}
-
-
-
-
-NS_IMETHODIMP nsTestXPCFoo::Test2_1(PRInt32 *p1, PRInt32 *p2, nsresult *_retval)
-{
-	LOG(("TEST: 2_1: [%d, %d] => ",
-	     *p1, *p2));
-
-	*p1 = *p1 + *p2;
-
-	*p2 += 1;
-
-	LOG(("TEST: 2_1:                                          => [%d, %d]\n",
-	     *p1, *p2));
-
-	*_retval = 2010;
-	return 2010;	//NS_OK;
-}
-
-NS_IMETHODIMP nsTestXPCFoo::Test2_2(PRInt64 *p1, PRInt64 *p2, nsresult *_retval)
-{
-	LOG(("TEST: 2_2: [%g, %g] => ",
-	     *p1, *p2));
-
-	*p1 = *p1 + *p2;
-
-	*p2 += 1;
-
-	LOG(("TEST: 2_2:                                                    => [%g, %g]\n",
-	     *p1, *p2));
-
-	*_retval = 2020;
-	return 2020;	//NS_OK;
-}
-
-NS_IMETHODIMP nsTestXPCFoo::Test2_3(float *p1, float *p2, nsresult *_retval)
-{
-	LOG(("TEST: 2_3: [%lf, %lf] => ",
-	     *p1, *p2));
-
-	*p1 = *p1 + *p2;
-
-	*p2 += 1.0f;
-
-	LOG(("TEST: 2_3:                                                    => [%lf, %lf]\n",
-	     *p1, *p2));
-
-	*_retval = 2030;
-	return 2030;	//NS_OK;
-}
-
-NS_IMETHODIMP nsTestXPCFoo::Test2_4(double *p1, double *p2, nsresult *_retval)
-{
-	LOG(("TEST: 2_4: [%le, %le] => ",
-	     *p1, *p2));
-
-	*p1 = *p1 + *p2;
-
-	*p2 += 1;
-
-	LOG(("TEST: 2_4:                                                    => [%le, %le]\n",
-	     *p1, *p2));
-
-	*_retval = 2040;
-	return 2040;	//NS_OK;
-}
-
-NS_IMETHODIMP nsTestXPCFoo::Test2_5(nsISupports **p1, nsISupports **p2, nsresult *_retval)
-{
-	if (p1 != nsnull && *p1 != nsnull)
-	{
-		nsITestProxy *test;
-		(*p1)->QueryInterface(NS_GET_IID(nsITestProxy), (void**)&test);
-		PRInt32 q1, q2;
-		nsresult retval = NS_ERROR_BASE;
-		q1 = 100, q2=200;
-		LOG(("TEST: 2_5: 1: [%d, %d] => ",
-		     q1, q2));
-		test->Test2_1(&q1, &q2, &retval);
-		LOG(("TEST: 2_5: 1:                                          => [%d, %d]\n",
-		     q1, q2));
-	}
-
-	*p2 = new nsTestXPCFoo();
-
-	LOG(("TEST: 2_5:                                                    => [0x%08X]\n",
-	     *p2));
-
-	*_retval = 2050;
-	return 2050;	//NS_OK;
-}
-
-
-
-
-
-NS_IMETHODIMP nsTestXPCFoo::Test3_1(PRInt32 *p1, PRInt32 *p2, PRInt32 *p3, nsresult *_retval)
-{
-	LOG(("TEST: 3_1: [%d, %d, %d] => ",
-	     *p1, *p2, *p3));
-
-	*p1 = *p1 + *p2 + *p3;
-
-	*p2 += 1;   *p3 += 1;
-
-	LOG(("TEST: 3_1:                                          => [%d, %d, %d]\n",
-	     *p1, *p2, *p3));
-
-	*_retval = 3010;
-	return 3010;	//NS_OK;
-}
-
-NS_IMETHODIMP nsTestXPCFoo::Test3_2(PRInt64 *p1, PRInt64 *p2, PRInt64 *p3, nsresult *_retval)
-{
-	LOG(("TEST: 3_2: [%g, %g, %g] => ",
-	     *p1, *p2, *p3));
-
-	*p1 = *p1 + *p2 + *p3;
-
-	*p2 += 1;   *p3 += 1;
-
-	LOG(("TEST: 3_2:                                                    => [%g, %g, %g]\n",
-	     *p1, *p2, *p3));
-
-	*_retval = 3020;
-	return 3020;	//NS_OK;
-}
-
-NS_IMETHODIMP nsTestXPCFoo::Test3_3(float *p1, float *p2, float *p3, nsresult *_retval)
-{
-	LOG(("TEST: 3_3: [%lf, %lf, %lf] => ",
-	     *p1, *p2, *p3));
-
-	*p1 = *p1 + *p2 + *p3;
-
-	*p2 += 1.0f;   *p3 += 1.0f;
-
-	LOG(("TEST: 3_3:                                                    => [%lf, %lf, %lf]\n",
-	     *p1, *p2, *p3));
-
-	*_retval = 3030;
-	return 3030;	//NS_OK;
-}
-
-NS_IMETHODIMP nsTestXPCFoo::Test3_4(double *p1, double *p2, double *p3, nsresult *_retval)
-{
-	LOG(("TEST: 3_4: [%le, %le, %le] => ",
-	     *p1, *p2, *p3));
-
-	*p1 = *p1 + *p2 + *p3;
-
-	*p2 += 1;   *p3 += 1;
-
-	LOG(("TEST: 3_4:                                                    => [%le, %le, %le]\n",
-	     *p1, *p2, *p3));
-
-	*_retval = 3040;
-	return 3040;	//NS_OK;
-}
-
-NS_IMETHODIMP nsTestXPCFoo::Test3_5(nsISupports **p1, nsISupports **p2, nsISupports **p3, nsresult *_retval)
-{
-	if (p1 != nsnull && *p1 != nsnull)
-	{
-		nsITestProxy *test;
-		(*p1)->QueryInterface(NS_GET_IID(nsITestProxy), (void**)&test);
-		PRInt32 q1, q2, q3;
-		nsresult retval = NS_ERROR_BASE;
-		q1 = 100, q2=200, q3=300;
-		LOG(("TEST: 3_5: 1: [%d, %d, %d] => ",
-		     q1, q2, q3));
-		test->Test3_1(&q1, &q2, &q3, &retval);
-		LOG(("TEST: 3_5: 1:                                          => [%d, %d, %d]\n",
-		     q1, q2, q3));
-	}
-
-	if (p2 != nsnull && *p2 != nsnull)
-	{
-		nsITestProxy *test;
-		(*p2)->QueryInterface(NS_GET_IID(nsITestProxy), (void**)&test);
-		PRInt64 q1, q2, q3;
-		nsresult retval = NS_ERROR_BASE;
-		q1 = 1000, q2=2000, q3=3000;
-		LOG(("TEST: 3_5: 2: [%g, %g, %g] => ",
-		     q1, q2, q3));
-		test->Test3_2(&q1, &q2, &q3, &retval);
-		LOG(("TEST: 3_5: 2:                                                    => [%g, %g, %g]\n",
-		     q1, q2, q3));
-	}
-
-	*p3 = new nsTestXPCFoo();
-
-	LOG(("TEST: 3_5:                                                    => [0x%08X]\n",
-	     *p3));
-
-	*_retval = 3050;
-	return 3050;	//NS_OK;
-}
-
-
-
-
-
-NS_IMETHODIMP nsTestXPCFoo::Test4_1(PRInt32 *p1, PRInt32 *p2, PRInt32 *p3, PRInt32 *p4, nsresult *_retval)
-{
-	LOG(("TEST: 4_1: [%d, %d, %d, %d] => ",
-	     *p1, *p2, *p3, *p4));
-
-	*p1 = *p1 + *p2 + *p3 + *p4;
-
-	*p2 += 1;   *p3 += 1;   *p4 += 1;
-
-	LOG(("TEST: 4_1:                                          => [%d, %d, %d, %d]\n",
-	     *p1, *p2, *p3, *p4));
-
-	*_retval = 4010;
-	return 4010;	//NS_OK;
-}
-
-NS_IMETHODIMP nsTestXPCFoo::Test4_2(PRInt64 *p1, PRInt64 *p2, PRInt64 *p3, PRInt64 *p4, nsresult *_retval)
-{
-	LOG(("TEST: 4_2: [%g, %g, %g, %g] => ",
-	     *p1, *p2, *p3, *p4));
-
-	*p1 = *p1 + *p2 + *p3 + *p4;
-
-	*p2 += 1;   *p3 += 1;   *p4 += 1;
-
-	LOG(("TEST: 4_2:                                                    => [%g, %g, %g, %g]\n",
-	     *p1, *p2, *p3, *p4));
-
-	*_retval = 4020;
-	return 4020;	//NS_OK;
-}
-
-NS_IMETHODIMP nsTestXPCFoo::Test4_3(float *p1, float *p2, float *p3, float *p4, nsresult *_retval)
-{
-	LOG(("TEST: 4_3: [%lf, %lf, %lf, %lf] => ",
-	     *p1, *p2, *p3, *p4));
-
-	     *p1 = *p1 + *p2 + *p3 + *p4;
-
-	*p2 += 1.0f;   *p3 += 1.0f;   *p4 += 1.0f;
-
-	LOG(("TEST: 4_3:                                                    => [%lf, %lf, %lf, %lf]\n",
-	     *p1, *p2, *p3, *p4));
-
-	*_retval = 4030;
-	return 4030;	//NS_OK;
-}
-
-NS_IMETHODIMP nsTestXPCFoo::Test4_4(double *p1, double *p2, double *p3, double *p4, nsresult *_retval)
-{
-	LOG(("TEST: 4_4: [%le, %le, %le, %le] => ",
-	     *p1, *p2, *p3, *p4));
-
-	*p1 = *p1 + *p2 + *p3 + *p4;
-
-	*p2 += 1;   *p3 += 1;   *p4 += 1;
-
-	LOG(("TEST: 4_4:                                                    => [%le, %le, %le, %le]\n",
-	     *p1, *p2, *p3, *p4));
-
-	*_retval = 4040;
-	return 4040;	//NS_OK;
-}
-
-NS_IMETHODIMP nsTestXPCFoo::Test4_5(nsISupports **p1, nsISupports **p2, nsISupports **p3, nsISupports **p4, nsresult *_retval)
-{
-	if (p1 != nsnull && *p1 != nsnull)
-	{
-		nsITestProxy *test;
-		(*p1)->QueryInterface(NS_GET_IID(nsITestProxy), (void**)&test);
-		PRInt32 q1, q2, q3, q4;
-		nsresult retval = NS_ERROR_BASE;
-		q1 = 100, q2=200, q3=300, q4=400;
-		LOG(("TEST: 4_5: 1: [%d, %d, %d, %d] => ",
-		     q1, q2, q3, q4));
-		test->Test4_1(&q1, &q2, &q3, &q4, &retval);
-		LOG(("TEST: 4_5: 1:                                          => [%d, %d, %d, %d]\n",
-		     q1, q2, q3, q4));
-	}
-
-	if (p2 != nsnull && *p2 != nsnull)
-	{
-		nsITestProxy *test;
-		(*p2)->QueryInterface(NS_GET_IID(nsITestProxy), (void**)&test);
-		PRInt64 q1, q2, q3, q4;
-		nsresult retval = NS_ERROR_BASE;
-		q1 = 1000, q2=2000, q3=3000, q4=4000;
-		LOG(("TEST: 4_5: 2: [%g, %g, %g, %g] => ",
-		     q1, q2, q3, q4));
-		test->Test4_2(&q1, &q2, &q3, &q4, &retval);
-		LOG(("TEST: 4_5: 2:                                                    => [%g, %g, %g, %g]\n",
-		     q1, q2, q3, q4));
-	}
-
-	if (p3 != nsnull && *p3 != nsnull)
-	{
-		nsITestProxy *test;
-		(*p3)->QueryInterface(NS_GET_IID(nsITestProxy), (void**)&test);
-		float q1, q2, q3, q4;
-		nsresult retval = NS_ERROR_BASE;
-		q1 = 10000, q2=20000, q3=30000, q4=40000;
-		LOG(("TEST: 4_5: 3: [%lf, %lf, %lf, %lf] => ",
-		     q1, q2, q3, q4));
-		test->Test4_3(&q1, &q2, &q3, &q4, &retval);
-		LOG(("TEST: 4_5: 3:                                                    => [%lf, %lf, %lf, %lf]\n",
-		     q1, q2, q3, q4));
-	}
-		
-	*p4 = new nsTestXPCFoo();
-
-	LOG(("TEST: 4_5:                                                    => [0x%08X]\n",
-	     *p4));
-
-	*_retval = 4050;
-	return 4050;	//NS_OK;
-}
-
-
-
-
-
-NS_IMETHODIMP nsTestXPCFoo::Test5_1(PRInt32 *p1, PRInt32 *p2, PRInt32 *p3, PRInt32 *p4, PRInt32 *p5, nsresult *_retval)
-{
-	LOG(("TEST: 5_1: [%d, %d, %d, %d, %d] => ",
-	     *p1, *p2, *p3, *p4, *p5));
-
-	*p1 = *p1 + *p2 + *p3 + *p4 + *p5;
-
-	*p2 += 1;   *p3 += 1;   *p4 += 1;   *p5 += 1;
-
-	LOG(("TEST: 5_1:                                          => [%d, %d, %d, %d, %d]\n",
-	     *p1, *p2, *p3, *p4, *p5));
-
-	*_retval = 5010;
-	return 5010;	//NS_OK;
-}
-
-NS_IMETHODIMP nsTestXPCFoo::Test5_2(PRInt64 *p1, PRInt64 *p2, PRInt64 *p3, PRInt64 *p4, PRInt64 *p5, nsresult *_retval)
-{
-	LOG(("TEST: 5_2: [%g, %g, %g, %g, %g] => ",
-	     *p1, *p2, *p3, *p4, *p5));
-
-	*p1 = *p1 + *p2 + *p3 + *p4 + *p5;
-
-	*p2 += 1;   *p3 += 1;   *p4 += 1;   *p5 += 1;
-
-	LOG(("TEST: 5_2:                                                    => [%g, %g, %g, %g, %g]\n",
-	     *p1, *p2, *p3, *p4, *p5));
-
-	*_retval = 5020;
-	return 5020;	//NS_OK;
-}
-
-NS_IMETHODIMP nsTestXPCFoo::Test5_3(float *p1, float *p2, float *p3, float *p4, float *p5, nsresult *_retval)
-{
-	LOG(("TEST: 5_3: [%lf, %lf, %lf, %lf, %lf] => ",
-	     *p1, *p2, *p3, *p4, *p5));
-
-	*p1 = *p1 + *p2 + *p3 + *p4 + *p5;
-
-	*p2 += 1.0f;   *p3 += 1.0f;   *p4 += 1.0f;   *p5 += 1.0;
-
-	LOG(("TEST: 5_3:                                                    => [%lf, %lf, %lf, %lf, %lf]\n",
-	     *p1, *p2, *p3, *p4, *p5));
-
-	*_retval = 5030;
-	return 5030;	//NS_OK;
-}
-
-NS_IMETHODIMP nsTestXPCFoo::Test5_4(double *p1, double *p2, double *p3, double *p4, double *p5, nsresult *_retval)
-{
-	LOG(("TEST: 5_4: [%le, %le, %le, %le, %le] => ",
-	     *p1, *p2, *p3, *p4, *p5));
-
-	*p1 = *p1 + *p2 + *p3 + *p4 + *p5;
-
-	*p2 += 1;   *p3 += 1;   *p4 += 1;   *p5 += 1;
-
-	LOG(("TEST: 5_4:                                                    => [%le, %le, %le, %le, %le]\n",
-	     *p1, *p2, *p3, *p4, *p5));
-
-	*_retval = 5040;
-	return 5040;	//NS_OK;
-}
-
-NS_IMETHODIMP nsTestXPCFoo::Test5_5(nsISupports **p1, nsISupports **p2, nsISupports **p3, nsISupports **p4, nsISupports **p5, nsresult *_retval)
-{
-	if (p1 != nsnull && *p1 != nsnull)
-	{
-		nsITestProxy *test;
-		(*p1)->QueryInterface(NS_GET_IID(nsITestProxy), (void**)&test);
-		PRInt32 q1, q2, q3, q4, q5;
-		nsresult retval = NS_ERROR_BASE;
-		q1 = 100, q2=200, q3=300, q4=400, q5=500;
-		LOG(("TEST: 5_5: 1: [%d, %d, %d, %d, %d] => ",
-		     q1, q2, q3, q4, q5));
-		test->Test5_1(&q1, &q2, &q3, &q4, &q5, &retval);
-		LOG(("TEST: 5_5: 1:                                          => [%d, %d, %d, %d, %d]\n",
-		     q1, q2, q3, q4, q5));
-	}
-
-	if (p2 != nsnull && *p2 != nsnull)
-	{
-		nsITestProxy *test;
-		(*p2)->QueryInterface(NS_GET_IID(nsITestProxy), (void**)&test);
-		PRInt64 q1, q2, q3, q4, q5;
-		nsresult retval = NS_ERROR_BASE;
-		q1 = 1000, q2=2000, q3=3000, q4=4000, q5=5000;
-		LOG(("TEST: 5_5: 2: [%g, %g, %g, %g, %g] => ",
-		     q1, q2, q3, q4, q5));
-		test->Test5_2(&q1, &q2, &q3, &q4, &q5, &retval);
-		LOG(("TEST: 5_5: 2:                                                    => [%g, %g, %g, %g, %g]\n",
-		     q1, q2, q3, q4, q5));
-	}
-
-	if (p3 != nsnull && *p3 != nsnull)
-	{
-		nsITestProxy *test;
-		(*p3)->QueryInterface(NS_GET_IID(nsITestProxy), (void**)&test);
-		float q1, q2, q3, q4, q5;
-		nsresult retval = NS_ERROR_BASE;
-		q1 = 10000, q2=20000, q3=30000, q4=40000, q5=50000;
-		LOG(("TEST: 5_5: 3: [%lf, %lf, %lf, %lf, %lf] => ",
-		     q1, q2, q3, q4, q5));
-		test->Test5_3(&q1, &q2, &q3, &q4, &q5, &retval);
-		LOG(("TEST: 5_5: 3:                                                    => [%lf, %lf, %lf, %lf, %lf]\n",
-		     q1, q2, q3, q4, q5));
-	}
-
-	if (p4 != nsnull && *p4 != nsnull)
-	{
-		nsITestProxy *test;
-		(*p4)->QueryInterface(NS_GET_IID(nsITestProxy), (void**)&test);
-		double q1, q2, q3, q4, q5;
-		nsresult retval = NS_ERROR_BASE;
-		q1 = 10000, q2=20000, q3=30000, q4=40000, q5=50000;
-		LOG(("TEST: 5_5: 4: [%le, %le, %le, %le, %le] => ",
-		     q1, q2, q3, q4, q5));
-		test->Test5_4(&q1, &q2, &q3, &q4, &q5, &retval);
-		LOG(("TEST: 5_5: 4:                                                    => [%le, %le, %le, %le, %le]\n",
-		     q1, q2, q3, q4, q5));
-	}
-
-	*p5 = new nsTestXPCFoo();
-
-	LOG(("TEST: 5_5:                                                    => [0x%08X]\n",
-	     *p5));
-
-	*_retval = 5050;
-	return 5050;	//NS_OK;
-}
-
-
-
-
-
-NS_IMETHODIMP nsTestXPCFoo::Test6_1(PRInt32 *p1, PRInt32 *p2, PRInt32 *p3, PRInt32 *p4, PRInt32 *p5, PRInt32 *p6, nsresult *_retval)
-{
-	LOG(("TEST: 6_1: [%d, %d, %d, %d, %d, %d] => ",
-	     *p1, *p2, *p3, *p4, *p5, *p6));
-
-	*p1 = *p1 + *p2 + *p3 + *p4 + *p5 + *p6;
-
-	*p2 += 1;   *p3 += 1;   *p4 += 1;   *p5 += 1;
-	*p6 += 1;
-
-	LOG(("TEST: 6_1:                                          => [%d, %d, %d, %d, %d, %d]\n",
-	     *p1, *p2, *p3, *p4, *p5, *p6));
-
-	*_retval = 6010;
-	return 6010;	//NS_OK;
-}
-
-NS_IMETHODIMP nsTestXPCFoo::Test6_2(PRInt64 *p1, PRInt64 *p2, PRInt64 *p3, PRInt64 *p4, PRInt64 *p5, PRInt64 *p6, nsresult *_retval)
-{
-	LOG(("TEST: 6_2: [%g, %g, %g, %g, %g, %g] => ",
-	     *p1, *p2, *p3, *p4, *p5, *p6));
-
-	*p1 = *p1 + *p2 + *p3 + *p4 + *p5 + *p6;
-
-	*p2 += 1;   *p3 += 1;   *p4 += 1;   *p5 += 1;
-	*p6 += 1;
-
-	LOG(("TEST: 6_2:                                                    => [%g, %g, %g, %g, %g, %g]\n",
-	     *p1, *p2, *p3, *p4, *p5, *p6));
-
-	*_retval = 6020;
-	return 6020;	//NS_OK;
-}
-
-NS_IMETHODIMP nsTestXPCFoo::Test6_3(float *p1, float *p2, float *p3, float *p4, float *p5, float *p6, nsresult *_retval)
-{
-	LOG(("TEST: 6_3: [%lf, %lf, %lf, %lf, %lf, %lf] => ",
-	     *p1, *p2, *p3, *p4, *p5, *p6));
-
-	*p1 = *p1 + *p2 + *p3 + *p4 + *p5 + *p6;
-
-	*p2 += 1.0f;   *p3 += 1.0f;   *p4 += 1.0f;   *p5 += 1.0f;
-	*p6 += 1.0f;
-
-	LOG(("TEST: 6_3:                                                    => [%lf, %lf, %lf, %lf, %lf, %lf]\n",
-	     *p1, *p2, *p3, *p4, *p5, *p6));
-
-	*_retval = 6030;
-	return 6030;	//NS_OK;
-}
-
-NS_IMETHODIMP nsTestXPCFoo::Test6_4(double *p1, double *p2, double *p3, double *p4, double *p5, double *p6, nsresult *_retval)
-{
-	LOG(("TEST: 6_4: [%le, %le, %le, %le, %le, %le] => ",
-	     *p1, *p2, *p3, *p4, *p5, *p6));
-
-	*p1 = *p1 + *p2 + *p3 + *p4 + *p5 + *p6;
-
-	*p2 += 1;   *p3 += 1;   *p4 += 1;   *p5 += 1;
-	*p6 += 1;
-
-	LOG(("TEST: 6_4:                                                    => [%le, %le, %le, %le, %le, %le]\n",
-	     *p1, *p2, *p3, *p4, *p5, *p6));
-
-	*_retval = 6040;
-	return 6040;	//NS_OK;
-}
-
-NS_IMETHODIMP nsTestXPCFoo::Test6_5(nsISupports **p1, nsISupports **p2, nsISupports **p3, nsISupports **p4, nsISupports **p5, nsISupports **p6, nsresult *_retval)
-{
-	if (p1 != nsnull && *p1 != nsnull)
-	{
-		nsITestProxy *test;
-		(*p1)->QueryInterface(NS_GET_IID(nsITestProxy), (void**)&test);
-		PRInt32 q1, q2, q3, q4, q5, q6;
-		nsresult retval = NS_ERROR_BASE;
-		q1 = 100, q2=200, q3=300, q4=400, q5=500, q6=600;
-		LOG(("TEST: 6_5: 1: [%d, %d, %d, %d, %d, %d] => ",
-		     q1, q2, q3, q4, q5, q6));
-		test->Test6_1(&q1, &q2, &q3, &q4, &q5, &q6, &retval);
-		LOG(("TEST: 6_5: 1:                                          => [%d, %d, %d, %d, %d, %d]\n",
-		     q1, q2, q3, q4, q5, q6));
-	}
-
-	if (p2 != nsnull && *p2 != nsnull)
-	{
-		nsITestProxy *test;
-		(*p2)->QueryInterface(NS_GET_IID(nsITestProxy), (void**)&test);
-		PRInt64 q1, q2, q3, q4, q5, q6;
-		nsresult retval = NS_ERROR_BASE;
-		q1 = 1000, q2=2000, q3=3000, q4=4000, q5=5000, q6=6000;
-		LOG(("TEST: 6_5: 2: [%g, %g, %g, %g, %g, %g] => ",
-		     q1, q2, q3, q4, q5, q6));
-		test->Test6_2(&q1, &q2, &q3, &q4, &q5, &q6, &retval);
-		LOG(("TEST: 6_5: 2:                                                    => [%g, %g, %g, %g, %g, %g]\n",
-		     q1, q2, q3, q4, q5, q6));
-	}
-
-	if (p3 != nsnull && *p3 != nsnull)
-	{
-		nsITestProxy *test;
-		(*p3)->QueryInterface(NS_GET_IID(nsITestProxy), (void**)&test);
-		float q1, q2, q3, q4, q5, q6;
-		nsresult retval = NS_ERROR_BASE;
-		q1 = 10000, q2=20000, q3=30000, q4=40000, q5=50000, q6=60000;
-		LOG(("TEST: 6_5: 3: [%lf, %lf, %lf, %lf, %lf, %lf] => ",
-		     q1, q2, q3, q4, q5, q6));
-		test->Test6_3(&q1, &q2, &q3, &q4, &q5, &q6, &retval);
-		LOG(("TEST: 6_5: 3:                                                    => [%lf, %lf, %lf, %lf, %lf, %lf]\n",
-		     q1, q2, q3, q4, q5, q6));
-	}
-
-	if (p4 != nsnull && *p4 != nsnull)
-	{
-		nsITestProxy *test;
-		(*p4)->QueryInterface(NS_GET_IID(nsITestProxy), (void**)&test);
-		double q1, q2, q3, q4, q5, q6;
-		nsresult retval = NS_ERROR_BASE;
-		q1 = 10000, q2=20000, q3=30000, q4=40000, q5=50000, q6=60000;
-		LOG(("TEST: 6_5: 4: [%le, %le, %le, %le, %le, %le] => ",
-		     q1, q2, q3, q4, q5, q6));
-		test->Test6_4(&q1, &q2, &q3, &q4, &q5, &q6, &retval);
-		LOG(("TEST: 6_5: 4:                                                    => [%le, %le, %le, %le, %le, %le]\n",
-		     q1, q2, q3, q4, q5, q6));
-	}
-
-	if (p5 != nsnull && *p5 != nsnull)
-	{
-		nsITestProxy *test;
-		(*p5)->QueryInterface(NS_GET_IID(nsITestProxy), (void**)&test);
-		PRInt32 q1, q2, q3, q4, q5, q6;
-		nsresult retval = NS_ERROR_BASE;
-		q1 = 150, q2=250, q3=350, q4=450, q5=550, q6=650;
-		LOG(("TEST: 6_5: 5: [%d, %d, %d, %d, %d, %d] => ",
-		     q1, q2, q3, q4, q5, q6));
-		test->Test6_1(&q1, &q2, &q3, &q4, &q5, &q6, &retval);
-		LOG(("TEST: 6_5: 5:                                          => [%d, %d, %d, %d, %d, %d]\n",
-		     q1, q2, q3, q4, q5, q6));
-	}
-
-	*p6 = new nsTestXPCFoo();
-
-	LOG(("TEST: 6_5:                                                    => [0x%08X]\n",
-	     *p6));
-
-	*_retval = 6050;
-	return 6050;	//NS_OK;
-}
-
-
-
-
-
-NS_IMETHODIMP nsTestXPCFoo::Test7_1(PRInt32 *p1, PRInt32 *p2, PRInt32 *p3, PRInt32 *p4, PRInt32 *p5, PRInt32 *p6, PRInt32 *p7, nsresult *_retval)
-{
-	LOG(("TEST: 7_1: [%d, %d, %d, %d, %d, %d, %d] => ",
-	     *p1, *p2, *p3, *p4, *p5, *p6, *p7));
-
-	*p1 = *p1 + *p2 + *p3 + *p4 + *p5 + *p6 + *p7;
-
-	*p2 += 1;   *p3 += 1;   *p4 += 1;   *p5 += 1;
-	*p6 += 1;   *p7 += 1;
-
-	LOG(("TEST: 7_1:                                          => [%d, %d, %d, %d, %d, %d, %d]\n",
-	     *p1, *p2, *p3, *p4, *p5, *p6, *p7));
-
-	*_retval = 7010;
-	return 7010;	//NS_OK;
-}
-
-NS_IMETHODIMP nsTestXPCFoo::Test7_2(PRInt64 *p1, PRInt64 *p2, PRInt64 *p3, PRInt64 *p4, PRInt64 *p5, PRInt64 *p6, PRInt64 *p7, nsresult *_retval)
-{
-	LOG(("TEST: 7_2: [%g, %g, %g, %g, %g, %g, %g] => ",
-	     *p1, *p2, *p3, *p4, *p5, *p6, *p7));
-
-	*p1 = *p1 + *p2 + *p3 + *p4 + *p5 + *p6 + *p7;
-
-	*p2 += 1;   *p3 += 1;   *p4 += 1;   *p5 += 1;
-	*p6 += 1;   *p7 += 1;
-
-	LOG(("TEST: 7_2:                                                    => [%g, %g, %g, %g, %g, %g, %g]\n",
-	     *p1, *p2, *p3, *p4, *p5, *p6, *p7));
-
-	*_retval = 7020;
-	return 7020;	//NS_OK;
-}
-
-NS_IMETHODIMP nsTestXPCFoo::Test7_3(float *p1, float *p2, float *p3, float *p4, float *p5, float *p6, float *p7, nsresult *_retval)
-{
-	LOG(("TEST: 7_3: [%lf, %lf, %lf, %lf, %lf, %lf, %lf] => ",
-	     *p1, *p2, *p3, *p4, *p5, *p6, *p7));
-
-	*p1 = *p1 + *p2 + *p3 + *p4 + *p5 + *p6 + *p7;
-
-	*p2 += 1.0f;   *p3 += 1.0f;   *p4 += 1.0f;   *p5 += 1.0f;
-	*p6 += 1.0f;   *p7 += 1.0f;
-
-	LOG(("TEST: 7_3:                                                    => [%lf, %lf, %lf, %lf, %lf, %lf, %lf]\n",
-	     *p1, *p2, *p3, *p4, *p5, *p6, *p7));
-
-	*_retval = 7030;
-	return 7030;	//NS_OK;
-}
-
-NS_IMETHODIMP nsTestXPCFoo::Test7_4(double *p1, double *p2, double *p3, double *p4, double *p5, double *p6, double *p7, nsresult *_retval)
-{
-	LOG(("TEST: 7_4: [%le, %le, %le, %le, %le, %le, %le] => ",
-	     *p1, *p2, *p3, *p4, *p5, *p6, *p7));
-
-	*p1 = *p1 + *p2 + *p3 + *p4 + *p5 + *p6 + *p7;
-
-	*p2 += 1;   *p3 += 1;   *p4 += 1;   *p5 += 1;
-	*p6 += 1;   *p7 += 1;
-
-	LOG(("TEST: 7_4:                                                    => [%le, %le, %le, %le, %le, %le, %le]\n",
-	     *p1, *p2, *p3, *p4, *p5, *p6, *p7));
-
-	*_retval = 7040;
-	return 7040;	//NS_OK;
-}
-
-NS_IMETHODIMP nsTestXPCFoo::Test7_5(nsISupports **p1, nsISupports **p2, nsISupports **p3, nsISupports **p4, nsISupports **p5, nsISupports **p6, nsISupports **p7, nsresult *_retval)
-{
-	if (p1 != nsnull && *p1 != nsnull)
-	{
-		nsITestProxy *test;
-		(*p1)->QueryInterface(NS_GET_IID(nsITestProxy), (void**)&test);
-		PRInt32 q1, q2, q3, q4, q5, q6, q7;
-		nsresult retval = NS_ERROR_BASE;
-		q1 = 100, q2=200, q3=300, q4=400, q5=500, q6=600, q7=700;
-		LOG(("TEST: 7_5: 1: [%d, %d, %d, %d, %d, %d, %d] => ",
-		     q1, q2, q3, q4, q5, q6, q7));
-		test->Test7_1(&q1, &q2, &q3, &q4, &q5, &q6, &q7, &retval);
-		LOG(("TEST: 7_5: 1:                                          => [%d, %d, %d, %d, %d, %d, %d]\n",
-		     q1, q2, q3, q4, q5, q6, q7));
-	}
-
-	if (p2 != nsnull && *p2 != nsnull)
-	{
-		nsITestProxy *test;
-		(*p2)->QueryInterface(NS_GET_IID(nsITestProxy), (void**)&test);
-		PRInt64 q1, q2, q3, q4, q5, q6, q7;
-		nsresult retval = NS_ERROR_BASE;
-		q1 = 1000, q2=2000, q3=3000, q4=4000, q5=5000, q6=6000, q7=7000;
-		LOG(("TEST: 7_5: 2: [%g, %g, %g, %g, %g, %g, %g] => ",
-		     q1, q2, q3, q4, q5, q6, q7));
-		test->Test7_2(&q1, &q2, &q3, &q4, &q5, &q6, &q7, &retval);
-		LOG(("TEST: 7_5: 2:                                                    => [%g, %g, %g, %g, %g, %g, %g]\n",
-		     q1, q2, q3, q4, q5, q6, q7));
-	}
-
-	if (p3 != nsnull && *p3 != nsnull)
-	{
-		nsITestProxy *test;
-		(*p3)->QueryInterface(NS_GET_IID(nsITestProxy), (void**)&test);
-		float q1, q2, q3, q4, q5, q6, q7;
-		nsresult retval = NS_ERROR_BASE;
-		q1 = 10000, q2=20000, q3=30000, q4=40000, q5=50000, q6=60000, q7=70000;
-		LOG(("TEST: 7_5: 3: [%lf, %lf, %lf, %lf, %lf, %lf, %lf] => ",
-		     q1, q2, q3, q4, q5, q6, q7));
-		test->Test7_3(&q1, &q2, &q3, &q4, &q5, &q6, &q7, &retval);
-		LOG(("TEST: 7_5: 3:                                                    => [%lf, %lf, %lf, %lf, %lf, %lf, %lf]\n",
-		     q1, q2, q3, q4, q5, q6, q7));
-	}
-
-	if (p4 != nsnull && *p4 != nsnull)
-	{
-		nsITestProxy *test;
-		(*p4)->QueryInterface(NS_GET_IID(nsITestProxy), (void**)&test);
-		double q1, q2, q3, q4, q5, q6, q7;
-		nsresult retval = NS_ERROR_BASE;
-		q1 = 10000, q2=20000, q3=30000, q4=40000, q5=50000, q6=60000, q7=70000;
-		LOG(("TEST: 7_5: 4: [%le, %le, %le, %le, %le, %le, %le] => ",
-		     q1, q2, q3, q4, q5, q6, q7));
-		test->Test7_4(&q1, &q2, &q3, &q4, &q5, &q6, &q7, &retval);
-		LOG(("TEST: 7_5: 4:                                                    => [%le, %le, %le, %le, %le, %le, %le]\n",
-		     q1, q2, q3, q4, q5, q6, q7));
-	}
-
-	if (p5 != nsnull && *p5 != nsnull)
-	{
-		nsITestProxy *test;
-		(*p5)->QueryInterface(NS_GET_IID(nsITestProxy), (void**)&test);
-		PRInt32 q1, q2, q3, q4, q5, q6, q7;
-		nsresult retval = NS_ERROR_BASE;
-		q1 = 150, q2=250, q3=350, q4=450, q5=550, q6=650, q7=750;
-		LOG(("TEST: 7_5: 5: [%d, %d, %d, %d, %d, %d, %d] => ",
-		     q1, q2, q3, q4, q5, q6, q7));
-		test->Test7_1(&q1, &q2, &q3, &q4, &q5, &q6, &q7, &retval);
-		LOG(("TEST: 7_5: 5:                                          => [%d, %d, %d, %d, %d, %d, %d]\n",
-		     q1, q2, q3, q4, q5, q6, q7));
-	}
-
-	if (p6 != nsnull && *p6 != nsnull)
-	{
-		nsITestProxy *test;
-		(*p6)->QueryInterface(NS_GET_IID(nsITestProxy), (void**)&test);
-		PRInt64 q1, q2, q3, q4, q5, q6, q7;
-		nsresult retval = NS_ERROR_BASE;
-		q1 = 1500, q2=2500, q3=3500, q4=4500, q5=5500, q6=6500, q7=7500;
-		LOG(("TEST: 7_5: 6: [%g, %g, %g, %g, %g, %g, %g] => ",
-		     q1, q2, q3, q4, q5, q6, q7));
-		test->Test7_2(&q1, &q2, &q3, &q4, &q5, &q6, &q7, &retval);
-		LOG(("TEST: 7_5: 6:                                                    => [%g, %g, %g, %g, %g, %g, %g]\n",
-		     q1, q2, q3, q4, q5, q6, q7));
-	}
-
-	*p7 = new nsTestXPCFoo();
-
-	LOG(("TEST: 7_5:                                                    => [0x%08X]\n",
-	     *p7));
-
-	*_retval = 7050;
-	return 7050;	//NS_OK;
-}
-
-
-
-
-
-NS_IMETHODIMP nsTestXPCFoo::Test8_1(PRInt32 *p1, PRInt32 *p2, PRInt32 *p3, PRInt32 *p4, PRInt32 *p5, PRInt32 *p6, PRInt32 *p7, PRInt32 *p8, nsresult *_retval)
-{
-	LOG(("TEST: 8_1: [%d, %d, %d, %d, %d, %d, %d, %d] => ",
-	     *p1, *p2, *p3, *p4, *p5, *p6, *p7, *p8));
-
-	*p1 = *p1 + *p2 + *p3 + *p4 + *p5 + *p6 + *p7 + *p8;
-
-	*p2 += 1;   *p3 += 1;   *p4 += 1;   *p5 += 1;
-	*p6 += 1;   *p7 += 1;   *p8 += 1;
-
-	LOG(("TEST: 8_1:                                          => [%d, %d, %d, %d, %d, %d, %d, %d]\n",
-	     *p1, *p2, *p3, *p4, *p5, *p6, *p7, *p8));
-
-	*_retval = 8010;
-	return 8010;	//NS_OK;
-}
-
-NS_IMETHODIMP nsTestXPCFoo::Test8_2(PRInt64 *p1, PRInt64 *p2, PRInt64 *p3, PRInt64 *p4, PRInt64 *p5, PRInt64 *p6, PRInt64 *p7, PRInt64 *p8, nsresult *_retval)
-{
-	LOG(("TEST: 8_2: [%g, %g, %g, %g, %g, %g, %g, %g] => ",
-	     *p1, *p2, *p3, *p4, *p5, *p6, *p7, *p8));
-
-	*p1 = *p1 + *p2 + *p3 + *p4 + *p5 + *p6 + *p7 + *p8;
-
-	*p2 += 1;   *p3 += 1;   *p4 += 1;   *p5 += 1;
-	*p6 += 1;   *p7 += 1;   *p8 += 1;
-
-	LOG(("TEST: 8_2:                                                    => [%g, %g, %g, %g, %g, %g, %g, %g]\n",
-	     *p1, *p2, *p3, *p4, *p5, *p6, *p7, *p8));
-
-	*_retval = 8020;
-	return 8020;	//NS_OK;
-}
-
-
-
-NS_IMETHODIMP nsTestXPCFoo::Test8_3(float *p1, float *p2, float *p3, float *p4, float *p5, float *p6, float *p7, float *p8, nsresult *_retval)
-{
-	LOG(("TEST: 8_3: [%lf, %lf, %lf, %lf, %lf, %lf, %lf, %lf] => ",
-	     *p1, *p2, *p3, *p4, *p5, *p6, *p7, *p8));
-
-	*p1 = *p1 + *p2 + *p3 + *p4 + *p5 + *p6 + *p7 + *p8;
-
-	*p2 += 1.0f;   *p3 += 1.0f;   *p4 += 1.0f;   *p5 += 1.0f;
-	*p6 += 1.0f;   *p7 += 1.0f;   *p8 += 1.0f;
-
-	LOG(("TEST: 8_3:                                                    => [%lf, %lf, %lf, %lf, %lf, %lf, %lf, %lf]\n",
-	     *p1, *p2, *p3, *p4, *p5, *p6, *p7, *p8));
-
-	*_retval = 8030;
-	return 8030;	//NS_OK;
-}
-
-NS_IMETHODIMP nsTestXPCFoo::Test8_4(double *p1, double *p2, double *p3, double *p4, double *p5, double *p6, double *p7, double *p8, nsresult *_retval)
-{
-	LOG(("TEST: 8_4: [%le, %le, %le, %le, %le, %le, %le, %le] => ",
-	     *p1, *p2, *p3, *p4, *p5, *p6, *p7, *p8));
-
-	*p1 = *p1 + *p2 + *p3 + *p4 + *p5 + *p6 + *p7 + *p8;
-
-	*p2 += 1;   *p3 += 1;   *p4 += 1;   *p5 += 1;
-	*p6 += 1;   *p7 += 1;   *p8 += 1;
-
-	LOG(("TEST: 8_4:                                                    => [%le, %le, %le, %le, %le, %le, %le, %le]\n",
-	     *p1, *p2, *p3, *p4, *p5, *p6, *p7, *p8));
-
-	*_retval = 8040;
-	return 8040;	//NS_OK;
-}
-
-NS_IMETHODIMP nsTestXPCFoo::Test8_5(nsISupports **p1, nsISupports **p2, nsISupports **p3, nsISupports **p4, nsISupports **p5, nsISupports **p6, nsISupports **p7, nsISupports **p8, nsresult *_retval)
-{
-	if (p1 != nsnull && *p1 != nsnull)
-	{
-		nsITestProxy *test;
-		(*p1)->QueryInterface(NS_GET_IID(nsITestProxy), (void**)&test);
-		PRInt32 q1, q2, q3, q4, q5, q6, q7, q8;
-		nsresult retval = NS_ERROR_BASE;
-		q1 = 100, q2=200, q3=300, q4=400, q5=500, q6=600, q7=700, q8=800;
-		LOG(("TEST: 8_5: 1: [%d, %d, %d, %d, %d, %d, %d, %d] => ",
-		     q1, q2, q3, q4, q5, q6, q7, q8));
-		test->Test8_1(&q1, &q2, &q3, &q4, &q5, &q6, &q7, &q8, &retval);
-		LOG(("TEST: 8_5: 1:                                          => [%d, %d, %d, %d, %d, %d, %d, %d]\n",
-		     q1, q2, q3, q4, q5, q6, q7, q8));
-	}
-
-	if (p2 != nsnull && *p2 != nsnull)
-	{
-		nsITestProxy *test;
-		(*p2)->QueryInterface(NS_GET_IID(nsITestProxy), (void**)&test);
-		PRInt64 q1, q2, q3, q4, q5, q6, q7, q8;
-		nsresult retval = NS_ERROR_BASE;
-		q1 = 1000, q2=2000, q3=3000, q4=4000, q5=5000, q6=6000, q7=7000, q8=8000;
-		LOG(("TEST: 8_5: 2: [%g, %g, %g, %g, %g, %g, %g, %g] => ",
-		     q1, q2, q3, q4, q5, q6, q7, q8));
-		test->Test8_2(&q1, &q2, &q3, &q4, &q5, &q6, &q7, &q8, &retval);
-		LOG(("TEST: 8_5: 2:                                                    => [%g, %g, %g, %g, %g, %g, %g, %g]\n",
-		     q1, q2, q3, q4, q5, q6, q7, q8));
-	}
-
-	if (p3 != nsnull && *p3 != nsnull)
-	{
-		nsITestProxy *test;
-		(*p3)->QueryInterface(NS_GET_IID(nsITestProxy), (void**)&test);
-		float q1, q2, q3, q4, q5, q6, q7, q8;
-		nsresult retval = NS_ERROR_BASE;
-		q1 = 10000, q2=20000, q3=30000, q4=40000, q5=50000, q6=60000, q7=70000, q8=80000;
-		LOG(("TEST: 8_5: 3: [%lf, %lf, %lf, %lf, %lf, %lf, %lf, %lf] => ",
-		     q1, q2, q3, q4, q5, q6, q7, q8));
-		test->Test8_3(&q1, &q2, &q3, &q4, &q5, &q6, &q7, &q8, &retval);
-		LOG(("TEST: 8_5: 3:                                                    => [%lf, %lf, %lf, %lf, %lf, %lf, %lf, %lf]\n",
-		     q1, q2, q3, q4, q5, q6, q7, q8));
-	}
-
-	if (p4 != nsnull && *p4 != nsnull)
-	{
-		nsITestProxy *test;
-		(*p4)->QueryInterface(NS_GET_IID(nsITestProxy), (void**)&test);
-		double q1, q2, q3, q4, q5, q6, q7, q8;
-		nsresult retval = NS_ERROR_BASE;
-		q1 = 10000, q2=20000, q3=30000, q4=40000, q5=50000, q6=60000, q7=70000, q8=80000;
-		LOG(("TEST: 8_5: 4: [%le, %le, %le, %le, %le, %le, %le, %le] => ",
-		     q1, q2, q3, q4, q5, q6, q7, q8));
-		test->Test8_4(&q1, &q2, &q3, &q4, &q5, &q6, &q7, &q8, &retval);
-		LOG(("TEST: 8_5: 4:                                                    => [%le, %le, %le, %le, %le, %le, %le, %le]\n",
-		     q1, q2, q3, q4, q5, q6, q7, q8));
-	}
-
-	if (p5 != nsnull && *p5 != nsnull)
-	{
-		nsITestProxy *test;
-		(*p5)->QueryInterface(NS_GET_IID(nsITestProxy), (void**)&test);
-		PRInt32 q1, q2, q3, q4, q5, q6, q7, q8;
-		nsresult retval = NS_ERROR_BASE;
-		q1 = 150, q2=250, q3=350, q4=450, q5=550, q6=650, q7=750, q8=850;
-		LOG(("TEST: 8_5: 5: [%d, %d, %d, %d, %d, %d, %d, %d] => ",
-		     q1, q2, q3, q4, q5, q6, q7, q8));
-		test->Test8_1(&q1, &q2, &q3, &q4, &q5, &q6, &q7, &q8, &retval);
-		LOG(("TEST: 8_5: 5:                                          => [%d, %d, %d, %d, %d, %d, %d, %d]\n",
-		     q1, q2, q3, q4, q5, q6, q7, q8));
-	}
-
-	if (p6 != nsnull && *p6 != nsnull)
-	{
-		nsITestProxy *test;
-		(*p6)->QueryInterface(NS_GET_IID(nsITestProxy), (void**)&test);
-		PRInt64 q1, q2, q3, q4, q5, q6, q7, q8;
-		nsresult retval = NS_ERROR_BASE;
-		q1 = 1500, q2=2500, q3=3500, q4=4500, q5=5500, q6=6500, q7=7500, q8=8500;
-		LOG(("TEST: 8_5: 6: [%g, %g, %g, %g, %g, %g, %g, %g] => ",
-		     q1, q2, q3, q4, q5, q6, q7, q8));
-		test->Test8_2(&q1, &q2, &q3, &q4, &q5, &q6, &q7, &q8, &retval);
-		LOG(("TEST: 8_5: 6:                                                    => [%g, %g, %g, %g, %g, %g, %g, %g]\n",
-		     q1, q2, q3, q4, q5, q6, q7, q8));
-	}
-
-	if (p7 != nsnull && *p7 != nsnull)
-	{
-		nsITestProxy *test;
-		(*p7)->QueryInterface(NS_GET_IID(nsITestProxy), (void**)&test);
-		float q1, q2, q3, q4, q5, q6, q7, q8;
-		nsresult retval = NS_ERROR_BASE;
-		q1 = 15000, q2=25000, q3=35000, q4=45000, q5=55000, q6=65000, q7=75000, q8=85000;
-		LOG(("TEST: 8_5: 7: [%lf, %lf, %lf, %lf, %lf, %lf, %lf, %lf] => ",
-		     q1, q2, q3, q4, q5, q6, q7, q8));
-		test->Test8_3(&q1, &q2, &q3, &q4, &q5, &q6, &q7, &q8, &retval);
-		LOG(("TEST: 8_5: 7:                                                    => [%lf, %lf, %lf, %lf, %lf, %lf, %lf, %lf]\n",
-		     q1, q2, q3, q4, q5, q6, q7, q8));
-	}
-
-
-	*p8 = new nsTestXPCFoo();
-
-	LOG(("TEST: 8_5:                                                    => [0x%08X]\n",
-	     *p8));
-
-	*_retval = 8050;
-	return 8050;	//NS_OK;
-}
-
-
-
-
-
-NS_IMETHODIMP nsTestXPCFoo::Test9_1(PRInt32 *p1, PRInt32 *p2, PRInt32 *p3, PRInt32 *p4, PRInt32 *p5, PRInt32 *p6, PRInt32 *p7, PRInt32 *p8, PRInt32 *p9, nsresult *_retval)
-{
-	LOG(("TEST: 9_1: [%d, %d, %d, %d, %d, %d, %d, %d, %d] => ",
-	     *p1, *p2, *p3, *p4, *p5, *p6, *p7, *p8, *p9));
-
-	*p1 = *p1 + *p2 + *p3 + *p4 + *p5 + *p6 + *p7 + *p8 + *p9;
-
-	*p2 += 1;   *p3 += 1;   *p4 += 1;   *p5 += 1;
-	*p6 += 1;   *p7 += 1;   *p8 += 1;   *p9 += 1;
-
-	LOG(("TEST: 9_1:                                          => [%d, %d, %d, %d, %d, %d, %d, %d, %d]\n",
-	     *p1, *p2, *p3, *p4, *p5, *p6, *p7, *p8, *p9));
-
-	*_retval = 9010;
-	return 9010;	//NS_OK;
-}
-
-NS_IMETHODIMP nsTestXPCFoo::Test9_2(PRInt64 *p1, PRInt64 *p2, PRInt64 *p3, PRInt64 *p4, PRInt64 *p5, PRInt64 *p6, PRInt64 *p7, PRInt64 *p8, PRInt64 *p9, nsresult *_retval)
-{
-	LOG(("TEST: 9_2: [%g, %g, %g, %g, %g, %g, %g, %g, %g] => ",
-	     *p1, *p2, *p3, *p4, *p5, *p6, *p7, *p8, *p9));
-
-	*p1 = *p1 + *p2 + *p3 + *p4 + *p5 + *p6 + *p7 + *p8 + *p9;
-
-	*p2 += 1;   *p3 += 1;   *p4 += 1;   *p5 += 1;
-	*p6 += 1;   *p7 += 1;   *p8 += 1;   *p9 += 1;
-
-	LOG(("TEST: 9_2:                                                    => [%g, %g, %g, %g, %g, %g, %g, %g, %g]\n",
-	     *p1, *p2, *p3, *p4, *p5, *p6, *p7, *p8, *p9));
-
-	*_retval = 9020;
-	return 9020;	//NS_OK;
-}
-
-
-NS_IMETHODIMP nsTestXPCFoo::Test9_3(float *p1, float *p2, float *p3, float *p4, float *p5, float *p6, float *p7, float *p8, float *p9, nsresult *_retval)
-{
-	LOG(("TEST: 9_3: [%lf, %lf, %lf, %lf, %lf, %lf, %lf, %lf, %lf] => ",
-	     *p1, *p2, *p3, *p4, *p5, *p6, *p7, *p8, *p9));
-
-	*p1 = *p1 + *p2 + *p3 + *p4 + *p5 + *p6 + *p7 + *p8 + *p9;
-
-	*p2 += 1.0f;   *p3 += 1.0f;   *p4 += 1.0f;   *p5 += 1.0f;
-	*p6 += 1.0f;   *p7 += 1.0f;   *p8 += 1.0f;   *p9 += 1.0f;
-
-	LOG(("TEST: 9_3:                                                    => [%lf, %lf, %lf, %lf, %lf, %lf, %lf, %lf, %lf]\n",
-	     *p1, *p2, *p3, *p4, *p5, *p6, *p7, *p8, *p9));
-
-	*_retval = 9030;
-	return 9030;	//NS_OK;
-}
-
-NS_IMETHODIMP nsTestXPCFoo::Test9_4(double *p1, double *p2, double *p3, double *p4, double *p5, double *p6, double *p7, double *p8, double *p9, nsresult *_retval)
-{
-	LOG(("TEST: 9_4: [%le, %le, %le, %le, %le, %le, %le, %le, %le] => ",
-	     *p1, *p2, *p3, *p4, *p5, *p6, *p7, *p8, *p9));
-
-	*p1 = *p1 + *p2 + *p3 + *p4 + *p5 + *p6 + *p7 + *p8 + *p9;
-
-	*p2 += 1;   *p3 += 1;   *p4 += 1;   *p5 += 1;
-	*p6 += 1;   *p7 += 1;   *p8 += 1;   *p9 += 1;
-
-	LOG(("TEST: 9_4:                                                    => [%le, %le, %le, %le, %le, %le, %le, %le, %le]\n",
-	     *p1, *p2, *p3, *p4, *p5, *p6, *p7, *p8, *p9));
-
-	*_retval = 9040;
-	return 9040;	//NS_OK;
-}
-
-NS_IMETHODIMP nsTestXPCFoo::Test9_5(nsISupports **p1, nsISupports **p2, nsISupports **p3, nsISupports **p4, nsISupports **p5, nsISupports **p6, nsISupports **p7, nsISupports **p8, nsISupports **p9, nsresult *_retval)
-{
-	if (p1 != nsnull && *p1 != nsnull)
-	{
-		nsITestProxy *test;
-		(*p1)->QueryInterface(NS_GET_IID(nsITestProxy), (void**)&test);
-		PRInt32 q1, q2, q3, q4, q5, q6, q7, q8, q9;
-		nsresult retval = NS_ERROR_BASE;
-		q1 = 100, q2=200, q3=300, q4=400, q5=500, q6=600, q7=700, q8=800, q9=900;
-		LOG(("TEST: 9_5: 1: [%d, %d, %d, %d, %d, %d, %d, %d, %d] => ",
-		     q1, q2, q3, q4, q5, q6, q7, q8, q9));
-		test->Test9_1(&q1, &q2, &q3, &q4, &q5, &q6, &q7, &q8, &q9, &retval);
-		LOG(("TEST: 9_5: 1:                                          => [%d, %d, %d, %d, %d, %d, %d, %d, %d]\n",
-		     q1, q2, q3, q4, q5, q6, q7, q8, q9));
-	}
-
-	if (p2 != nsnull && *p2 != nsnull)
-	{
-		nsITestProxy *test;
-		(*p2)->QueryInterface(NS_GET_IID(nsITestProxy), (void**)&test);
-		PRInt64 q1, q2, q3, q4, q5, q6, q7, q8, q9;
-		nsresult retval = NS_ERROR_BASE;
-		q1 = 1000, q2=2000, q3=3000, q4=4000, q5=5000, q6=6000, q7=7000, q8=8000, q9=9000;
-		LOG(("TEST: 9_5: 2: [%g, %g, %g, %g, %g, %g, %g, %g, %g] => ",
-		     q1, q2, q3, q4, q5, q6, q7, q8, q9));
-		test->Test9_2(&q1, &q2, &q3, &q4, &q5, &q6, &q7, &q8, &q9, &retval);
-		LOG(("TEST: 9_5: 2:                                                    => [%g, %g, %g, %g, %g, %g, %g, %g, %g]\n",
-		     q1, q2, q3, q4, q5, q6, q7, q8, q9));
-	}
-
-	if (p3 != nsnull && *p3 != nsnull)
-	{
-		nsITestProxy *test;
-		(*p3)->QueryInterface(NS_GET_IID(nsITestProxy), (void**)&test);
-		float q1, q2, q3, q4, q5, q6, q7, q8, q9;
-		nsresult retval = NS_ERROR_BASE;
-		q1 = 10000, q2=20000, q3=30000, q4=40000, q5=50000, q6=60000, q7=70000, q8=80000, q9=90000;
-		LOG(("TEST: 9_5: 3: [%lf, %lf, %lf, %lf, %lf, %lf, %lf, %lf, %lf] => ",
-		     q1, q2, q3, q4, q5, q6, q7, q8, q9));
-		test->Test9_3(&q1, &q2, &q3, &q4, &q5, &q6, &q7, &q8, &q9, &retval);
-		LOG(("TEST: 9_5: 3:                                                    => [%lf, %lf, %lf, %lf, %lf, %lf, %lf, %lf, %lf]\n",
-		     q1, q2, q3, q4, q5, q6, q7, q8, q9));
-	}
-
-
-	if (p4 != nsnull && *p4 != nsnull)
-	{
-		nsITestProxy *test;
-		(*p4)->QueryInterface(NS_GET_IID(nsITestProxy), (void**)&test);
-		double q1, q2, q3, q4, q5, q6, q7, q8, q9;
-		nsresult retval = NS_ERROR_BASE;
-		q1 = 10000, q2=20000, q3=30000, q4=40000, q5=50000, q6=60000, q7=70000, q8=80000, q9=90000;
-		LOG(("TEST: 9_5: 4: [%le, %le, %le, %le, %le, %le, %le, %le, %le] => ",
-		     q1, q2, q3, q4, q5, q6, q7, q8, q9));
-		test->Test9_4(&q1, &q2, &q3, &q4, &q5, &q6, &q7, &q8, &q9, &retval);
-		LOG(("TEST: 9_5: 4:                                                    => [%le, %le, %le, %le, %le, %le, %le, %le, %le]\n",
-		     q1, q2, q3, q4, q5, q6, q7, q8, q9));
-	}
-
-	if (p5 != nsnull && *p5 != nsnull)
-	{
-		nsITestProxy *test;
-		(*p5)->QueryInterface(NS_GET_IID(nsITestProxy), (void**)&test);
-		PRInt32 q1, q2, q3, q4, q5, q6, q7, q8, q9;
-		nsresult retval = NS_ERROR_BASE;
-		q1 = 150, q2=250, q3=350, q4=450, q5=550, q6=650, q7=750, q8=850, q9=950;
-		LOG(("TEST: 9_5: 5: [%d, %d, %d, %d, %d, %d, %d, %d, %d] => ",
-		     q1, q2, q3, q4, q5, q6, q7, q8, q9));
-		test->Test9_1(&q1, &q2, &q3, &q4, &q5, &q6, &q7, &q8, &q9, &retval);
-		LOG(("TEST: 9_5: 5:                                          => [%d, %d, %d, %d, %d, %d, %d, %d, %d]\n",
-		     q1, q2, q3, q4, q5, q6, q7, q8, q9));
-	}
-
-	if (p6 != nsnull && *p6 != nsnull)
-	{
-		nsITestProxy *test;
-		(*p6)->QueryInterface(NS_GET_IID(nsITestProxy), (void**)&test);
-		PRInt64 q1, q2, q3, q4, q5, q6, q7, q8, q9;
-		nsresult retval = NS_ERROR_BASE;
-		q1 = 1500, q2=2500, q3=3500, q4=4500, q5=5500, q6=6500, q7=7500, q8=8500, q9=9500;
-		LOG(("TEST: 9_5: 6: [%g, %g, %g, %g, %g, %g, %g, %g, %g] => ",
-		     q1, q2, q3, q4, q5, q6, q7, q8, q9));
-		test->Test9_2(&q1, &q2, &q3, &q4, &q5, &q6, &q7, &q8, &q9, &retval);
-		LOG(("TEST: 9_5: 6:                                                    => [%g, %g, %g, %g, %g, %g, %g, %g, %g]\n",
-		     q1, q2, q3, q4, q5, q6, q7, q8, q9));
-	}
-
-	if (p7 != nsnull && *p7 != nsnull)
-	{
-		nsITestProxy *test;
-		(*p7)->QueryInterface(NS_GET_IID(nsITestProxy), (void**)&test);
-		float q1, q2, q3, q4, q5, q6, q7, q8, q9;
-		nsresult retval = NS_ERROR_BASE;
-		q1 = 15000, q2=25000, q3=35000, q4=45000, q5=55000, q6=65000, q7=75000, q8=85000, q9=95000;
-		LOG(("TEST: 9_5: 7: [%lf, %lf, %lf, %lf, %lf, %lf, %lf, %lf, %lf] => ",
-		     q1, q2, q3, q4, q5, q6, q7, q8, q9));
-		test->Test9_3(&q1, &q2, &q3, &q4, &q5, &q6, &q7, &q8, &q9, &retval);
-		LOG(("TEST: 9_5: 7:                                                    => [%lf, %lf, %lf, %lf, %lf, %lf, %lf, %lf, %lf]\n",
-		     q1, q2, q3, q4, q5, q6, q7, q8, q9));
-	}
-
-
-	if (p8 != nsnull && *p8 != nsnull)
-	{
-		nsITestProxy *test;
-		(*p8)->QueryInterface(NS_GET_IID(nsITestProxy), (void**)&test);
-		double q1, q2, q3, q4, q5, q6, q7, q8, q9;
-		nsresult retval = NS_ERROR_BASE;
-		q1 = 16000, q2=26000, q3=36000, q4=46000, q5=56000, q6=66000, q7=76000, q8=86000, q9=96000;
-		LOG(("TEST: 9_5: 8: [%le, %le, %le, %le, %le, %le, %le, %le, %le] => ",
-		     q1, q2, q3, q4, q5, q6, q7, q8, q9));
-		test->Test9_4(&q1, &q2, &q3, &q4, &q5, &q6, &q7, &q8, &q9, &retval);
-		LOG(("TEST: 9_5: 8:                                                    => [%le, %le, %le, %le, %le, %le, %le, %le, %le]\n",
-		     q1, q2, q3, q4, q5, q6, q7, q8, q9));
-	}
-
-	*p9 = new nsTestXPCFoo();
-
-	LOG(("TEST: 9_5:                                                    => [0x%08X]\n",
-	     *p9));
-
-	*_retval = 9050;
-	return 9050;	//NS_OK;
-}
-
-
-
-
-
-NS_IMETHODIMP nsTestXPCFoo::Test10_1(PRInt32 *p1, PRInt32 *p2, PRInt32 *p3, PRInt32 *p4, PRInt32 *p5, PRInt32 *p6, PRInt32 *p7, PRInt32 *p8, PRInt32 *p9, PRInt32 *p10, nsresult *_retval)
-{
-	LOG(("TEST: 10_1: [%d, %d, %d, %d, %d, %d, %d, %d, %d, %d] => ",
-	     *p1, *p2, *p3, *p4, *p5, *p6, *p7, *p8, *p9, *p10));
-
-	*p1 = *p1 + *p2 + *p3 + *p4 + *p5 + *p6 + *p7 + *p8 + *p9 + *p10;
-
-	*p2 += 1;   *p3 += 1;   *p4 += 1;   *p5 += 1;
-	*p6 += 1;   *p7 += 1;   *p8 += 1;   *p9 += 1;   *p10 += 1;
-
-	LOG(("TEST: 10_1:                                          => [%d, %d, %d, %d, %d, %d, %d, %d, %d, %d]\n",
-	     *p1, *p2, *p3, *p4, *p5, *p6, *p7, *p8, *p9, *p10));
-
-	*_retval = 10010;
-	return 10010;	//NS_OK;
-}
-
-NS_IMETHODIMP nsTestXPCFoo::Test10_2(PRInt64 *p1, PRInt64 *p2, PRInt64 *p3, PRInt64 *p4, PRInt64 *p5, PRInt64 *p6, PRInt64 *p7, PRInt64 *p8, PRInt64 *p9, PRInt64 *p10, nsresult *_retval)
-{
-	LOG(("TEST: 10_2: [%g, %g, %g, %g, %g, %g, %g, %g, %g, %g] => ",
-	     *p1, *p2, *p3, *p4, *p5, *p6, *p7, *p8, *p9, *p10));
-
-	*p1 = *p1 + *p2 + *p3 + *p4 + *p5 + *p6 + *p7 + *p8 + *p9 + *p10;
-
-	*p2 += 1;   *p3 += 1;   *p4 += 1;   *p5 += 1;
-	*p6 += 1;   *p7 += 1;   *p8 += 1;   *p9 += 1;   *p10 += 1;
-
-	LOG(("TEST: 10_2:                                                    => [%g, %g, %g, %g, %g, %g, %g, %g, %g, %g]\n",
-	     *p1, *p2, *p3, *p4, *p5, *p6, *p7, *p8, *p9, *p10));
-
-	*_retval = 10020;
-	return 10020;	//NS_OK;
-}
-
-NS_IMETHODIMP nsTestXPCFoo::Test10_3(float *p1, float *p2, float *p3, float *p4, float *p5, float *p6, float *p7, float *p8, float *p9, float *p10, nsresult *_retval)
-{
-	LOG(("TEST: 10_3: [%lf, %lf, %lf, %lf, %lf, %lf, %lf, %lf, %lf, %lf] => ",
-	     *p1, *p2, *p3, *p4, *p5, *p6, *p7, *p8, *p9, *p10));
-
-	*p1 = *p1 + *p2 + *p3 + *p4 + *p5 + *p6 + *p7 + *p8 + *p9 + *p10;
-
-	*p2 += 1.0f;   *p3 += 1.0f;   *p4 += 1.0f;   *p5 += 1.0f;
-	*p6 += 1.0f;   *p7 += 1.0f;   *p8 += 1.0f;   *p9 += 1.0f;   *p10 += 1.0f;
-
-	LOG(("TEST: 10_3:                                                    => [%lf, %lf, %lf, %lf, %lf, %lf, %lf, %lf, %lf, %lf]\n",
-	     *p1, *p2, *p3, *p4, *p5, *p6, *p7, *p8, *p9, *p10));
-
-	*_retval = 10030;
-	return 10030;	//NS_OK;
-}
-
-NS_IMETHODIMP nsTestXPCFoo::Test10_4(double *p1, double *p2, double *p3, double *p4, double *p5, double *p6, double *p7, double *p8, double *p9, double *p10, nsresult *_retval)
-{
-	LOG(("TEST: 10_4: [%le, %le, %le, %le, %le, %le, %le, %le, %le, %le] => ",
-	     *p1, *p2, *p3, *p4, *p5, *p6, *p7, *p8, *p9, *p10));
-
-	*p1 = *p1 + *p2 + *p3 + *p4 + *p5 + *p6 + *p7 + *p8 + *p9 + *p10;
-
-	*p2 += 1;   *p3 += 1;   *p4 += 1;   *p5 += 1;
-	*p6 += 1;   *p7 += 1;   *p8 += 1;   *p9 += 1;   *p10 += 1;
-
-	LOG(("TEST: 10_4:                                                    => [%le, %le, %le, %le, %le, %le, %le, %le, %le, %le]\n",
-	     *p1, *p2, *p3, *p4, *p5, *p6, *p7, *p8, *p9, *p10));
-
-	*_retval = 10040;
-	return 10040;	//NS_OK;
-}
-
-NS_IMETHODIMP nsTestXPCFoo::Test10_5(nsISupports **p1, nsISupports **p2, nsISupports **p3, nsISupports **p4, nsISupports **p5, nsISupports **p6, nsISupports **p7, nsISupports **p8, nsISupports **p9, nsISupports **p10, nsresult *_retval)
-{
-	if (p1 != nsnull && *p1 != nsnull)
-	{
-		nsITestProxy *test;
-		(*p1)->QueryInterface(NS_GET_IID(nsITestProxy), (void**)&test);
-		PRInt32 q1, q2, q3, q4, q5, q6, q7, q8, q9, q10;
-		nsresult retval = NS_ERROR_BASE;
-		q1 = 100, q2=200, q3=300, q4=400, q5=500, q6=600, q7=700, q8=800, q9=900, q10=1000;
-		LOG(("TEST: 10_5: 1: [%d, %d, %d, %d, %d, %d, %d, %d, %d, %d] => ",
-		     q1, q2, q3, q4, q5, q6, q7, q8, q9, q10));
-		test->Test10_1(&q1, &q2, &q3, &q4, &q5, &q6, &q7, &q8, &q9, &q10, &retval);
-		LOG(("TEST: 10_5: 1:                                          => [%d, %d, %d, %d, %d, %d, %d, %d, %d, %d]\n",
-		     q1, q2, q3, q4, q5, q6, q7, q8, q9, q10));
-	}
-
-	if (p2 != nsnull && *p2 != nsnull)
-	{
-		nsITestProxy *test;
-		(*p2)->QueryInterface(NS_GET_IID(nsITestProxy), (void**)&test);
-		PRInt64 q1, q2, q3, q4, q5, q6, q7, q8, q9, q10;
-		nsresult retval = NS_ERROR_BASE;
-		q1 = 1000, q2=2000, q3=3000, q4=4000, q5=5000, q6=6000, q7=7000, q8=8000, q9=9000, q10=10000;
-		LOG(("TEST: 10_5: 2: [%g, %g, %g, %g, %g, %g, %g, %g, %g, %g] => ",
-		     q1, q2, q3, q4, q5, q6, q7, q8, q9, q10));
-		test->Test10_2(&q1, &q2, &q3, &q4, &q5, &q6, &q7, &q8, &q9, &q10, &retval);
-		LOG(("TEST: 10_5: 2:                                                    => [%g, %g, %g, %g, %g, %g, %g, %g, %g, %g]\n",
-		     q1, q2, q3, q4, q5, q6, q7, q8, q9, q10));
-	}
-
-	if (p3 != nsnull && *p3 != nsnull)
-	{
-		nsITestProxy *test;
-		(*p3)->QueryInterface(NS_GET_IID(nsITestProxy), (void**)&test);
-		float q1, q2, q3, q4, q5, q6, q7, q8, q9, q10;
-		nsresult retval = NS_ERROR_BASE;
-		q1 = 10000, q2=20000, q3=30000, q4=40000, q5=50000, q6=60000, q7=70000, q8=80000, q9=90000, q10=100000;
-		LOG(("TEST: 10_5: 3: [%lf, %lf, %lf, %lf, %lf, %lf, %lf, %lf, %lf, %lf] => ",
-		     q1, q2, q3, q4, q5, q6, q7, q8, q9, q10));
-		test->Test10_3(&q1, &q2, &q3, &q4, &q5, &q6, &q7, &q8, &q9, &q10, &retval);
-		LOG(("TEST: 10_5: 3:                                                    => [%lf, %lf, %lf, %lf, %lf, %lf, %lf, %lf, %lf, %lf]\n",
-		     q1, q2, q3, q4, q5, q6, q7, q8, q9, q10));
-	}
-
-
-	if (p4 != nsnull && *p4 != nsnull)
-	{
-		nsITestProxy *test;
-		(*p4)->QueryInterface(NS_GET_IID(nsITestProxy), (void**)&test);
-		double q1, q2, q3, q4, q5, q6, q7, q8, q9, q10;
-		nsresult retval = NS_ERROR_BASE;
-		q1 = 10000, q2=20000, q3=30000, q4=40000, q5=50000, q6=60000, q7=70000, q8=80000, q9=90000, q10=100000;
-		LOG(("TEST: 10_5: 4: [%le, %le, %le, %le, %le, %le, %le, %le, %le, %le] => ",
-		     q1, q2, q3, q4, q5, q6, q7, q8, q9, q10));
-		test->Test10_4(&q1, &q2, &q3, &q4, &q5, &q6, &q7, &q8, &q9, &q10, &retval);
-		LOG(("TEST: 10_5: 4:                                                    => [%le, %le, %le, %le, %le, %le, %le, %le, %le, %le]\n",
-		     q1, q2, q3, q4, q5, q6, q7, q8, q9, q10));
-	}
-
-	if (p5 != nsnull && *p5 != nsnull)
-	{
-		nsITestProxy *test;
-		(*p5)->QueryInterface(NS_GET_IID(nsITestProxy), (void**)&test);
-		PRInt32 q1, q2, q3, q4, q5, q6, q7, q8, q9, q10;
-		nsresult retval = NS_ERROR_BASE;
-		q1 = 150, q2=250, q3=350, q4=450, q5=550, q6=650, q7=750, q8=850, q9=950, q10=1050;
-		LOG(("TEST: 10_5: 5: [%d, %d, %d, %d, %d, %d, %d, %d, %d, %d] => ",
-		     q1, q2, q3, q4, q5, q6, q7, q8, q9, q10));
-		test->Test10_1(&q1, &q2, &q3, &q4, &q5, &q6, &q7, &q8, &q9, &q10, &retval);
-		LOG(("TEST: 10_5: 5:                                          => [%d, %d, %d, %d, %d, %d, %d, %d, %d, %d]\n",
-		     q1, q2, q3, q4, q5, q6, q7, q8, q9, q10));
-	}
-
-	if (p6 != nsnull && *p6 != nsnull)
-	{
-		nsITestProxy *test;
-		(*p6)->QueryInterface(NS_GET_IID(nsITestProxy), (void**)&test);
-		PRInt64 q1, q2, q3, q4, q5, q6, q7, q8, q9, q10;
-		nsresult retval = NS_ERROR_BASE;
-		q1 = 1500, q2=2500, q3=3500, q4=4500, q5=5500, q6=6500, q7=7500, q8=8500, q9=9500, q10=10500;
-		LOG(("TEST: 10_5: 6: [%g, %g, %g, %g, %g, %g, %g, %g, %g, %g] => ",
-		     q1, q2, q3, q4, q5, q6, q7, q8, q9, q10));
-		test->Test10_2(&q1, &q2, &q3, &q4, &q5, &q6, &q7, &q8, &q9, &q10, &retval);
-		LOG(("TEST: 10_5: 6:                                                    => [%g, %g, %g, %g, %g, %g, %g, %g, %g, %g]\n",
-		     q1, q2, q3, q4, q5, q6, q7, q8, q9, q10));
-	}
-
-	if (p7 != nsnull && *p7 != nsnull)
-	{
-		nsITestProxy *test;
-		(*p7)->QueryInterface(NS_GET_IID(nsITestProxy), (void**)&test);
-		float q1, q2, q3, q4, q5, q6, q7, q8, q9, q10;
-		nsresult retval = NS_ERROR_BASE;
-		q1 = 15000, q2=25000, q3=35000, q4=45000, q5=55000, q6=65000, q7=75000, q8=85000, q9=95000, q10=105000;
-		LOG(("TEST: 10_5: 7: [%lf, %lf, %lf, %lf, %lf, %lf, %lf, %lf, %lf, %lf] => ",
-		     q1, q2, q3, q4, q5, q6, q7, q8, q9, q10));
-		test->Test10_3(&q1, &q2, &q3, &q4, &q5, &q6, &q7, &q8, &q9, &q10, &retval);
-		LOG(("TEST: 10_5: 7:                                                    => [%lf, %lf, %lf, %lf, %lf, %lf, %lf, %lf, %lf, %lf]\n",
-		     q1, q2, q3, q4, q5, q6, q7, q8, q9, q10));
-	}
-
-
-	if (p8 != nsnull && *p8 != nsnull)
-	{
-		nsITestProxy *test;
-		(*p8)->QueryInterface(NS_GET_IID(nsITestProxy), (void**)&test);
-		double q1, q2, q3, q4, q5, q6, q7, q8, q9, q10;
-		nsresult retval = NS_ERROR_BASE;
-		q1 = 16000, q2=26000, q3=36000, q4=46000, q5=56000, q6=66000, q7=76000, q8=86000, q9=96000, q10=106000;
-		LOG(("TEST: 10_5: 8: [%le, %le, %le, %le, %le, %le, %le, %le, %le, %le] => ",
-		     q1, q2, q3, q4, q5, q6, q7, q8, q9, q10));
-		test->Test10_4(&q1, &q2, &q3, &q4, &q5, &q6, &q7, &q8, &q9, &q10, &retval);
-		LOG(("TEST: 10_5: 8:                                                    => [%le, %le, %le, %le, %le, %le, %le, %le, %le, %le]\n",
-		     q1, q2, q3, q4, q5, q6, q7, q8, q9, q10));
-	}
-
-
-	if (p9 != nsnull && *p9 != nsnull)
-	{
-		nsITestProxy *test;
-		(*p9)->QueryInterface(NS_GET_IID(nsITestProxy), (void**)&test);
-		PRInt32 q1, q2, q3, q4, q5, q6, q7, q8, q9, q10;
-		nsresult retval = NS_ERROR_BASE;
-		q1 = 175, q2=275, q3=375, q4=475, q5=575, q6=675, q7=775, q8=875, q9=975, q10=1075;
-		LOG(("TEST: 10_5: 9: [%d, %d, %d, %d, %d, %d, %d, %d, %d, %d] => ",
-		     q1, q2, q3, q4, q5, q6, q7, q8, q9, q10));
-		test->Test10_1(&q1, &q2, &q3, &q4, &q5, &q6, &q7, &q8, &q9, &q10, &retval);
-		LOG(("TEST: 10_5: 9:                                          => [%d, %d, %d, %d, %d, %d, %d, %d, %d, %d]\n",
-		     q1, q2, q3, q4, q5, q6, q7, q8, q9, q10));
-	}
-
-	*p10 = new nsTestXPCFoo();
-
-	LOG(("TEST: 10_5:                                                    => [0x%08X]\n",
-	     *p10));
-
-	*_retval = 10050;
-	return 10050;	//NS_OK;
-}
-
-
-
-
-
-
-
-
-
-
-/***************************************************************************/
-/* nsTestXPCFoo2                                                           */
-/***************************************************************************/
-nsTestXPCFoo2::nsTestXPCFoo2()
-{
-	NS_ADDREF_THIS();
-}
-
-
-NS_IMPL_THREADSAFE_ISUPPORTS1(nsTestXPCFoo2, nsITestProxy2)
-
-NS_IMETHODIMP nsTestXPCFoo2::Test(PRInt32 p1, PRInt32 p2, PRInt32 *_retval)
-{
-	LOG(("TEST: calling back to caller!\n"));
-
-	nsCOMPtr<nsIProxyObjectManager> manager =
-		do_GetService(NS_XPCOMPROXY_CONTRACTID);
-
-	LOG(("TEST: ProxyObjectManager: %p \n", (void *) manager.get()));
-
-	PR_ASSERT(manager);
-
-	nsCOMPtr<nsIThread> thread;
-	GetThreadFromPRThread((PRThread *) p1, getter_AddRefs(thread));
-	NS_ENSURE_STATE(thread);
-
-	nsresult r;
-	nsCOMPtr<nsITestProxy> proxyObject;
-	manager->GetProxyForObject(thread, NS_GET_IID(nsITestProxy), this, NS_PROXY_SYNC, (void**)&proxyObject);
-	proxyObject->Test3(nsnull, nsnull, &r);
-
-	LOG(("TEST: Deleting Proxy Object\n"));
-	return NS_OK;
-}
-
-
-NS_IMETHODIMP nsTestXPCFoo2::Test2(nsresult *_retval)
-{
-	LOG(("TEST: nsTestXPCFoo2::Test2() called\n"));
-	*_retval = 0x11223344;
-	return NS_OK;
-}
-
-
-NS_IMETHODIMP nsTestXPCFoo2::Test3(nsISupports *p1, nsISupports **p2 NS_OUTPARAM, nsresult *_retval)
-{
-	LOG(("TEST: Got called"));
-	return NS_OK;
-}
-
-
-
deleted file mode 100644
--- a/xpcom/proxy/tests/testproxyclasses.h
+++ /dev/null
@@ -1,138 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Pierre Phaneuf <pp@ludusdesign.com>
- *   John Wolfe <wolfe@lobo.us>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#ifndef testproxyclasses_h__
-#define testproxyclasses_h__
-
-
-/***************************************************************************/
-/* nsTestXPCFoo                                                            */
-/***************************************************************************/
-class nsTestXPCFoo : public nsITestProxy
-{
-    NS_DECL_ISUPPORTS
-
-    NS_IMETHOD Test(PRInt32 p1, PRInt32 p2, PRInt32 *_retval NS_OUTPARAM);
-    NS_IMETHOD Test2(nsresult *_retval NS_OUTPARAM);
-    NS_IMETHOD Test3(nsISupports *p1, nsISupports **p2 NS_OUTPARAM, nsresult *_retval NS_OUTPARAM);
-
-    NS_IMETHOD Test1_1(PRInt32 *p1 NS_INOUTPARAM, nsresult *_retval NS_OUTPARAM);
-    NS_IMETHOD Test1_2(PRInt64 *p1 NS_INOUTPARAM, nsresult *_retval NS_OUTPARAM);
-    NS_IMETHOD Test1_3(float *p1 NS_INOUTPARAM, nsresult *_retval NS_OUTPARAM);
-    NS_IMETHOD Test1_4(double *p1 NS_INOUTPARAM, nsresult *_retval NS_OUTPARAM);
-    NS_IMETHOD Test1_5(nsISupports **p1 NS_INOUTPARAM, nsresult *_retval NS_OUTPARAM);
-
-    NS_IMETHOD Test2_1(PRInt32 *p1 NS_INOUTPARAM, PRInt32 *p2 NS_INOUTPARAM, nsresult *_retval NS_OUTPARAM);
-    NS_IMETHOD Test2_2(PRInt64 *p1 NS_INOUTPARAM, PRInt64 *p2 NS_INOUTPARAM, nsresult *_retval NS_OUTPARAM);
-    NS_IMETHOD Test2_3(float *p1 NS_INOUTPARAM, float *p2 NS_INOUTPARAM, nsresult *_retval NS_OUTPARAM);
-    NS_IMETHOD Test2_4(double *p1 NS_INOUTPARAM, double *p2 NS_INOUTPARAM, nsresult *_retval NS_OUTPARAM);
-    NS_IMETHOD Test2_5(nsISupports **p1 NS_INOUTPARAM, nsISupports **p2 NS_INOUTPARAM, nsresult *_retval NS_OUTPARAM);
-
-    NS_IMETHOD Test3_1(PRInt32 *p1 NS_INOUTPARAM, PRInt32 *p2 NS_INOUTPARAM, PRInt32 *p3 NS_INOUTPARAM, nsresult *_retval NS_OUTPARAM);
-    NS_IMETHOD Test3_2(PRInt64 *p1 NS_INOUTPARAM, PRInt64 *p2 NS_INOUTPARAM, PRInt64 *p3 NS_INOUTPARAM, nsresult *_retval NS_OUTPARAM);
-    NS_IMETHOD Test3_3(float *p1 NS_INOUTPARAM, float *p2 NS_INOUTPARAM, float *p3 NS_INOUTPARAM, nsresult *_retval NS_OUTPARAM);
-    NS_IMETHOD Test3_4(double *p1 NS_INOUTPARAM, double *p2 NS_INOUTPARAM, double *p3 NS_INOUTPARAM, nsresult *_retval NS_OUTPARAM);
-    NS_IMETHOD Test3_5(nsISupports **p1 NS_INOUTPARAM, nsISupports **p2 NS_INOUTPARAM, nsISupports **p3 NS_INOUTPARAM, nsresult *_retval NS_OUTPARAM);
-
-    NS_IMETHOD Test4_1(PRInt32 *p1 NS_INOUTPARAM, PRInt32 *p2 NS_INOUTPARAM, PRInt32 *p3 NS_INOUTPARAM, PRInt32 *p4 NS_INOUTPARAM, nsresult *_retval NS_OUTPARAM);
-    NS_IMETHOD Test4_2(PRInt64 *p1 NS_INOUTPARAM, PRInt64 *p2 NS_INOUTPARAM, PRInt64 *p3 NS_INOUTPARAM, PRInt64 *p4 NS_INOUTPARAM, nsresult *_retval NS_OUTPARAM);
-    NS_IMETHOD Test4_3(float *p1 NS_INOUTPARAM, float *p2 NS_INOUTPARAM, float *p3 NS_INOUTPARAM, float *p4 NS_INOUTPARAM, nsresult *_retval NS_OUTPARAM);
-    NS_IMETHOD Test4_4(double *p1 NS_INOUTPARAM, double *p2 NS_INOUTPARAM, double *p3 NS_INOUTPARAM, double *p4 NS_INOUTPARAM, nsresult *_retval NS_OUTPARAM);
-    NS_IMETHOD Test4_5(nsISupports **p1 NS_INOUTPARAM, nsISupports **p2 NS_INOUTPARAM, nsISupports **p3 NS_INOUTPARAM, nsISupports **p4 NS_INOUTPARAM, nsresult *_retval NS_OUTPARAM);
-
-    NS_IMETHOD Test5_1(PRInt32 *p1 NS_INOUTPARAM, PRInt32 *p2 NS_INOUTPARAM, PRInt32 *p3 NS_INOUTPARAM, PRInt32 *p4 NS_INOUTPARAM, PRInt32 *p5 NS_INOUTPARAM, nsresult *_retval NS_OUTPARAM);
-    NS_IMETHOD Test5_2(PRInt64 *p1 NS_INOUTPARAM, PRInt64 *p2 NS_INOUTPARAM, PRInt64 *p3 NS_INOUTPARAM, PRInt64 *p4 NS_INOUTPARAM, PRInt64 *p5 NS_INOUTPARAM, nsresult *_retval NS_OUTPARAM);
-    NS_IMETHOD Test5_3(float *p1 NS_INOUTPARAM, float *p2 NS_INOUTPARAM, float *p3 NS_INOUTPARAM, float *p4 NS_INOUTPARAM, float *p5 NS_INOUTPARAM, nsresult *_retval NS_OUTPARAM);
-    NS_IMETHOD Test5_4(double *p1 NS_INOUTPARAM, double *p2 NS_INOUTPARAM, double *p3 NS_INOUTPARAM, double *p4 NS_INOUTPARAM, double *p5 NS_INOUTPARAM, nsresult *_retval NS_OUTPARAM);
-    NS_IMETHOD Test5_5(nsISupports **p1 NS_INOUTPARAM, nsISupports **p2 NS_INOUTPARAM, nsISupports **p3 NS_INOUTPARAM, nsISupports **p4 NS_INOUTPARAM, nsISupports **p5 NS_INOUTPARAM, nsresult *_retval NS_OUTPARAM);
-
-    NS_IMETHOD Test6_1(PRInt32 *p1 NS_INOUTPARAM, PRInt32 *p2 NS_INOUTPARAM, PRInt32 *p3 NS_INOUTPARAM, PRInt32 *p4 NS_INOUTPARAM, PRInt32 *p5 NS_INOUTPARAM, PRInt32 *p6 NS_INOUTPARAM, nsresult *_retval NS_OUTPARAM);
-    NS_IMETHOD Test6_2(PRInt64 *p1 NS_INOUTPARAM, PRInt64 *p2 NS_INOUTPARAM, PRInt64 *p3 NS_INOUTPARAM, PRInt64 *p4 NS_INOUTPARAM, PRInt64 *p5 NS_INOUTPARAM, PRInt64 *p6 NS_INOUTPARAM, nsresult *_retval NS_OUTPARAM);
-    NS_IMETHOD Test6_3(float *p1 NS_INOUTPARAM, float *p2 NS_INOUTPARAM, float *p3 NS_INOUTPARAM, float *p4 NS_INOUTPARAM, float *p5 NS_INOUTPARAM, float *p6 NS_INOUTPARAM, nsresult *_retval NS_OUTPARAM);
-    NS_IMETHOD Test6_4(double *p1 NS_INOUTPARAM, double *p2 NS_INOUTPARAM, double *p3 NS_INOUTPARAM, double *p4 NS_INOUTPARAM, double *p5 NS_INOUTPARAM, double *p6 NS_INOUTPARAM, nsresult *_retval NS_OUTPARAM);
-    NS_IMETHOD Test6_5(nsISupports **p1 NS_INOUTPARAM, nsISupports **p2 NS_INOUTPARAM, nsISupports **p3 NS_INOUTPARAM, nsISupports **p4 NS_INOUTPARAM, nsISupports **p5 NS_INOUTPARAM, nsISupports **p6 NS_INOUTPARAM, nsresult *_retval NS_OUTPARAM);
-
-    NS_IMETHOD Test7_1(PRInt32 *p1 NS_INOUTPARAM, PRInt32 *p2 NS_INOUTPARAM, PRInt32 *p3 NS_INOUTPARAM, PRInt32 *p4 NS_INOUTPARAM, PRInt32 *p5 NS_INOUTPARAM, PRInt32 *p6 NS_INOUTPARAM, PRInt32 *p7 NS_INOUTPARAM, nsresult *_retval NS_OUTPARAM);
-    NS_IMETHOD Test7_2(PRInt64 *p1 NS_INOUTPARAM, PRInt64 *p2 NS_INOUTPARAM, PRInt64 *p3 NS_INOUTPARAM, PRInt64 *p4 NS_INOUTPARAM, PRInt64 *p5 NS_INOUTPARAM, PRInt64 *p6 NS_INOUTPARAM, PRInt64 *p7 NS_INOUTPARAM, nsresult *_retval NS_OUTPARAM);
-    NS_IMETHOD Test7_3(float *p1 NS_INOUTPARAM, float *p2 NS_INOUTPARAM, float *p3 NS_INOUTPARAM, float *p4 NS_INOUTPARAM, float *p5 NS_INOUTPARAM, float *p6 NS_INOUTPARAM, float *p7 NS_INOUTPARAM, nsresult *_retval NS_OUTPARAM);
-    NS_IMETHOD Test7_4(double *p1 NS_INOUTPARAM, double *p2 NS_INOUTPARAM, double *p3 NS_INOUTPARAM, double *p4 NS_INOUTPARAM, double *p5 NS_INOUTPARAM, double *p6 NS_INOUTPARAM, double *p7 NS_INOUTPARAM, nsresult *_retval NS_OUTPARAM);
-    NS_IMETHOD Test7_5(nsISupports **p1 NS_INOUTPARAM, nsISupports **p2 NS_INOUTPARAM, nsISupports **p3 NS_INOUTPARAM, nsISupports **p4 NS_INOUTPARAM, nsISupports **p5 NS_INOUTPARAM, nsISupports **p6 NS_INOUTPARAM, nsISupports **p7 NS_INOUTPARAM, nsresult *_retval NS_OUTPARAM);
-
-    NS_IMETHOD Test8_1(PRInt32 *p1 NS_INOUTPARAM, PRInt32 *p2 NS_INOUTPARAM, PRInt32 *p3 NS_INOUTPARAM, PRInt32 *p4 NS_INOUTPARAM, PRInt32 *p5 NS_INOUTPARAM, PRInt32 *p6 NS_INOUTPARAM, PRInt32 *p7 NS_INOUTPARAM, PRInt32 *p8 NS_INOUTPARAM, nsresult *_retval NS_OUTPARAM);
-    NS_IMETHOD Test8_2(PRInt64 *p1 NS_INOUTPARAM, PRInt64 *p2 NS_INOUTPARAM, PRInt64 *p3 NS_INOUTPARAM, PRInt64 *p4 NS_INOUTPARAM, PRInt64 *p5 NS_INOUTPARAM, PRInt64 *p6 NS_INOUTPARAM, PRInt64 *p7 NS_INOUTPARAM, PRInt64 *p8 NS_INOUTPARAM, nsresult *_retval NS_OUTPARAM);
-    NS_IMETHOD Test8_3(float *p1 NS_INOUTPARAM, float *p2 NS_INOUTPARAM, float *p3 NS_INOUTPARAM, float *p4 NS_INOUTPARAM, float *p5 NS_INOUTPARAM, float *p6 NS_INOUTPARAM, float *p7 NS_INOUTPARAM, float *p8 NS_INOUTPARAM, nsresult *_retval NS_OUTPARAM);
-    NS_IMETHOD Test8_4(double *p1 NS_INOUTPARAM, double *p2 NS_INOUTPARAM, double *p3 NS_INOUTPARAM, double *p4 NS_INOUTPARAM, double *p5 NS_INOUTPARAM, double *p6 NS_INOUTPARAM, double *p7 NS_INOUTPARAM, double *p8 NS_INOUTPARAM, nsresult *_retval NS_OUTPARAM);
-    NS_IMETHOD Test8_5(nsISupports **p1 NS_INOUTPARAM, nsISupports **p2 NS_INOUTPARAM, nsISupports **p3 NS_INOUTPARAM, nsISupports **p4 NS_INOUTPARAM, nsISupports **p5 NS_INOUTPARAM, nsISupports **p6 NS_INOUTPARAM, nsISupports **p7 NS_INOUTPARAM, nsISupports **p8 NS_INOUTPARAM, nsresult *_retval NS_OUTPARAM);
-
-    NS_IMETHOD Test9_1(PRInt32 *p1 NS_INOUTPARAM, PRInt32 *p2 NS_INOUTPARAM, PRInt32 *p3 NS_INOUTPARAM, PRInt32 *p4 NS_INOUTPARAM, PRInt32 *p5 NS_INOUTPARAM, PRInt32 *p6 NS_INOUTPARAM, PRInt32 *p7 NS_INOUTPARAM, PRInt32 *p8 NS_INOUTPARAM, PRInt32 *p9 NS_INOUTPARAM, nsresult *_retval NS_OUTPARAM);
-    NS_IMETHOD Test9_2(PRInt64 *p1 NS_INOUTPARAM, PRInt64 *p2 NS_INOUTPARAM, PRInt64 *p3 NS_INOUTPARAM, PRInt64 *p4 NS_INOUTPARAM, PRInt64 *p5 NS_INOUTPARAM, PRInt64 *p6 NS_INOUTPARAM, PRInt64 *p7 NS_INOUTPARAM, PRInt64 *p8 NS_INOUTPARAM, PRInt64 *p9 NS_INOUTPARAM, nsresult *_retval NS_OUTPARAM);
-    NS_IMETHOD Test9_3(float *p1 NS_INOUTPARAM, float *p2 NS_INOUTPARAM, float *p3 NS_INOUTPARAM, float *p4 NS_INOUTPARAM, float *p5 NS_INOUTPARAM, float *p6 NS_INOUTPARAM, float *p7 NS_INOUTPARAM, float *p8 NS_INOUTPARAM, float *p9 NS_INOUTPARAM, nsresult *_retval NS_OUTPARAM);
-    NS_IMETHOD Test9_4(double *p1 NS_INOUTPARAM, double *p2 NS_INOUTPARAM, double *p3 NS_INOUTPARAM, double *p4 NS_INOUTPARAM, double *p5 NS_INOUTPARAM, double *p6 NS_INOUTPARAM, double *p7 NS_INOUTPARAM, double *p8 NS_INOUTPARAM, double *p9 NS_INOUTPARAM, nsresult *_retval NS_OUTPARAM);
-    NS_IMETHOD Test9_5(nsISupports **p1 NS_INOUTPARAM, nsISupports **p2 NS_INOUTPARAM, nsISupports **p3 NS_INOUTPARAM, nsISupports **p4 NS_INOUTPARAM, nsISupports **p5 NS_INOUTPARAM, nsISupports **p6 NS_INOUTPARAM, nsISupports **p7 NS_INOUTPARAM, nsISupports **p8 NS_INOUTPARAM, nsISupports **p9 NS_INOUTPARAM, nsresult *_retval NS_OUTPARAM);
-
-    NS_IMETHOD Test10_1(PRInt32 *p1 NS_INOUTPARAM, PRInt32 *p2 NS_INOUTPARAM, PRInt32 *p3 NS_INOUTPARAM, PRInt32 *p4 NS_INOUTPARAM, PRInt32 *p5 NS_INOUTPARAM, PRInt32 *p6 NS_INOUTPARAM, PRInt32 *p7 NS_INOUTPARAM, PRInt32 *p8 NS_INOUTPARAM, PRInt32 *p9 NS_INOUTPARAM, PRInt32 *p10 NS_INOUTPARAM, nsresult *_retval NS_OUTPARAM);
-    NS_IMETHOD Test10_2(PRInt64 *p1 NS_INOUTPARAM, PRInt64 *p2 NS_INOUTPARAM, PRInt64 *p3 NS_INOUTPARAM, PRInt64 *p4 NS_INOUTPARAM, PRInt64 *p5 NS_INOUTPARAM, PRInt64 *p6 NS_INOUTPARAM, PRInt64 *p7 NS_INOUTPARAM, PRInt64 *p8 NS_INOUTPARAM, PRInt64 *p9 NS_INOUTPARAM, PRInt64 *p10 NS_INOUTPARAM, nsresult *_retval NS_OUTPARAM);
-    NS_IMETHOD Test10_3(float *p1 NS_INOUTPARAM, float *p2 NS_INOUTPARAM, float *p3 NS_INOUTPARAM, float *p4 NS_INOUTPARAM, float *p5 NS_INOUTPARAM, float *p6 NS_INOUTPARAM, float *p7 NS_INOUTPARAM, float *p8 NS_INOUTPARAM, float *p9 NS_INOUTPARAM, float *p10 NS_INOUTPARAM, nsresult *_retval NS_OUTPARAM);
-    NS_IMETHOD Test10_4(double *p1 NS_INOUTPARAM, double *p2 NS_INOUTPARAM, double *p3 NS_INOUTPARAM, double *p4 NS_INOUTPARAM, double *p5 NS_INOUTPARAM, double *p6 NS_INOUTPARAM, double *p7 NS_INOUTPARAM, double *p8 NS_INOUTPARAM, double *p9 NS_INOUTPARAM, double *p10 NS_INOUTPARAM, nsresult *_retval NS_OUTPARAM);
-    NS_IMETHOD Test10_5(nsISupports **p1 NS_INOUTPARAM, nsISupports **p2 NS_INOUTPARAM, nsISupports **p3 NS_INOUTPARAM, nsISupports **p4 NS_INOUTPARAM, nsISupports **p5 NS_INOUTPARAM, nsISupports **p6 NS_INOUTPARAM, nsISupports **p7 NS_INOUTPARAM, nsISupports **p8 NS_INOUTPARAM, nsISupports **p9 NS_INOUTPARAM, nsISupports **p10 NS_INOUTPARAM, nsresult *_retval NS_OUTPARAM);
-
-    nsTestXPCFoo();
-};
-
-
-
-
-/***************************************************************************/
-/* nsTestXPCFoo2                                                           */
-/***************************************************************************/
-class nsTestXPCFoo2 : public nsITestProxy2
-{
-	NS_DECL_ISUPPORTS
-
-	NS_IMETHOD Test(PRInt32 p1, PRInt32 p2, PRInt32 *_retval NS_OUTPARAM);
-	NS_IMETHOD Test2(nsresult *_retval NS_OUTPARAM);
-	NS_IMETHOD Test3(nsISupports *p1, nsISupports **p2 NS_OUTPARAM, nsresult *_retval NS_OUTPARAM);
-
-	nsTestXPCFoo2();
-};
-
-
-
-#endif
-
--- a/xpcom/reflect/xptcall/src/md/win32/xptc_arm_ceppc.asm
+++ b/xpcom/reflect/xptcall/src/md/win32/xptc_arm_ceppc.asm
@@ -282,18 +282,19 @@ FuncName    SETS    VBar:CC:"?Stub$Numbe
 
 	mov	lr, pc		  ; call mathod
 	mov	pc, ip		  ;
 
 	add	sp, sp, r4	  ; restore stack pointer
 				  ; the result is in r0
 
 
-	str       r0, [sp]        ; Start unwinding the stack
+	ldr       r0, [sp]        ; Start unwinding the stack
 	str       r0, [sp, #0x20] 
+	ldr       r0, [sp, #0x20]
 
 ; 225  : }    
 
 	add       sp, sp, #0x2C
 	ldmia     sp, {r4, r5, sp, pc}
 
 	ENTRY_END