[ooo-build-commit] .: patches/mono

Noel Power noelp at kemper.freedesktop.org
Fri Aug 20 03:08:37 PDT 2010


 patches/mono/component-support/examples/complextoolbar/mono-tempfixes.diff |  163 +---------
 1 file changed, 30 insertions(+), 133 deletions(-)

New commits:
commit 461f29664ef7e18d21249e0ddf409f840d2eba05
Author: Noel Power <noel.power at novell.com>
Date:   Fri Aug 20 11:09:55 2010 +0100

    clean up bridge fixes etc.
    
    * patches/mono/component-support/examples/complextoolbar/mono-tempfixes.diff:

diff --git a/patches/mono/component-support/examples/complextoolbar/mono-tempfixes.diff b/patches/mono/component-support/examples/complextoolbar/mono-tempfixes.diff
index 4f85ab6..2366aa0 100644
--- a/patches/mono/component-support/examples/complextoolbar/mono-tempfixes.diff
+++ b/patches/mono/component-support/examples/complextoolbar/mono-tempfixes.diff
@@ -20,105 +20,55 @@ index cde3f40..b24c701 100644
  CSCFLAGS += -checked+ -define:DEBUG -define:TRACE -debug+
  .ELSE
 diff --git cli_ure/source/mono_bridge/.bridge.cs.swp cli_ure/source/mono_bridge/.bridge.cs.swp
-deleted file mode 100644
-index 994437f..0000000
-Binary files cli_ure/source/mono_bridge/.bridge.cs.swp and /dev/null differ
+index 994437f..f67f4ae 100644
+Binary files cli_ure/source/mono_bridge/.bridge.cs.swp and cli_ure/source/mono_bridge/.bridge.cs.swp differ
 diff --git cli_ure/source/mono_bridge/bridge.cs cli_ure/source/mono_bridge/bridge.cs
-index bcab902..50b0b2e 100644
+index bcab902..931b8c8 100644
 --- cli_ure/source/mono_bridge/bridge.cs
 +++ cli_ure/source/mono_bridge/bridge.cs
-@@ -344,14 +344,18 @@ public unsafe class Bridge
-                 TypeDescription.Complete((TypeDescription **)&compTD);
+@@ -1679,9 +1679,9 @@ public unsafe class Bridge
  
-             int members = compTD->nMembers;
-+//            Console.WriteLine("** struct has " + members + " members " );
-             Type managedType = null;
-             if (managedData != null)
-                 managedType = managedData.GetType();
- 
-             if (compTD->pBaseTypeDescription != null)
-+            {
-+//                Console.WriteLine( "** probably bad that we are about to recurse here " );
-                 MapToUno(unoData, managedData,
-                          (TypeDescription *)((TypeDescription *)compTD->pBaseTypeDescription)->pWeakRef,
-                          assign);
-+            }
- 
-             TypeDescriptionReference *memberType = null;
-             for (int i = 0; i < members; ++i)
-@@ -362,6 +366,7 @@ public unsafe class Bridge
-                 if (managedData != null)
-                 {
-                     string fieldName = UString.UStringToString(compTD->ppMemberNames[i]);
-+//                    Console.WriteLine( "FieldName[ " + i + " ] is " + fieldName );
-                     FieldInfo fieldInfo = managedType.GetField(fieldName);
-                     // special case for Exception.Message property
-                     // The com.sun.star.uno.Exception.Message field is mapped to the
-@@ -1676,12 +1681,25 @@ public unsafe class Bridge
- 	    unoRetPtr = (void *)unoArgs;
- 	    unoArgs = (largest *)((byte *)unoRetPtr + returnSize);
- 	}
--
-+//        Console.WriteLine( "CallUno calling method with " + nParams + " params ");
          for (int i = 0; i < nParams; ++i)
          {
-+//            Console.WriteLine( "CallUno getting type for param " + i );
-             // FIXME it's a TypeDescriptionReference
+-            // FIXME it's a TypeDescriptionReference
 -            TypeDescription *type = (TypeDescription *)parameters[i].pTypeRef;
 -
 +            TypeDescriptionReference *typeref = (TypeDescriptionReference *)parameters[i].pTypeRef;
-+            //TypeDescription *type = typeref->pType;
 +            TypeDescription *type = null;
 +            TypeDescriptionReference.GetDescription(&type, typeref);
-+/*
-+            if ( type == null )
-+                Console.WriteLine( "CallUno after getting type for param " + i + " but it's null :-( ");
-+            else 
-+            {
-+                Console.WriteLine( "CallUno after getting type for param " + i ); 
-+                string paramTypeName = UString.UStringToString(type->pTypeName); 
-+                Console.WriteLine( "CallUno after typename for param " + i + " is " + paramTypeName + " type size is " + type->nSize );
-+            }
-+*/
              unoArgPtrs[i] = unoArgs + i;
              if ((type->eTypeClass == TypeClass.STRUCT ||
                   type->eTypeClass == TypeClass.EXCEPTION) &&
-@@ -1695,17 +1713,21 @@ public unsafe class Bridge
-                             
+@@ -1696,7 +1696,7 @@ public unsafe class Bridge
              if (parameters[i].bIn != 0)
              {
-+//                Console.WriteLine( "CallUno calling maptouno for param " + i + " of " + nParams);
                  // FIXME error handling
 -                MapToUno(unoArgPtrs[i], args[i], type, false /* no assign */);
 +                MapToUno(unoArgPtrs[i], args[i], (TypeDescription*)typeref, false /* no assign */);
-+//                Console.WriteLine( "after CallUno calling maptouno for param " + i  + " of " + nParams);
              }
          }
  
-         uno.Binary.Any unoExceptionHolder;
-         uno.Binary.Any *unoExc = &unoExceptionHolder;
- 
-+//        Console.WriteLine( "before dispatch");
-         // call binary uno      
-         uno.Binary.Interface.Dispatch(
-             unoInterface, memberTD, unoRetPtr, unoArgPtrs, &unoExc);
-+        Console.WriteLine( "after dispatch");
- 
-         if (unoExc == null)
-         {
-@@ -1828,6 +1850,7 @@ public unsafe class Bridge
+@@ -1828,13 +1828,27 @@ public unsafe class Bridge
                  MapToManaged(ref args[i], unoArgs[i], parameters[i].pTypeRef, null, false);
  
          object invocationResult = null;
-+
++        Exception exc = null;
          try
          {
              invocationResult = method.Invoke(managedI, args);
-@@ -1835,6 +1858,12 @@ public unsafe class Bridge
+         }
          catch (TargetInvocationException e)
          {
-             Exception exc = e.InnerException;
-+            if ( !( e.InnerException is unoidl.com.sun.star.uno.Exception ) )
+-            Exception exc = e.InnerException;
++            exc = e.InnerException;
++        }
++        catch (Exception e)
++        {
++            exc = e;
++        }
++        if ( exc != null )
++        {
++            if ( !( exc is unoidl.com.sun.star.uno.Exception ) )
 +            {
 +                // #FIXME put more info in here trace, stack etc. ( when I
 +                // figure out how to do that in mono )
@@ -127,80 +77,27 @@ index bcab902..50b0b2e 100644
              TypeDescription* td = null;
              // FIXME leak
              TypeDescriptionReference.GetDescription(&td, MapManagedType(exc.GetType()));
-@@ -1846,7 +1875,7 @@ public unsafe class Bridge
+@@ -1844,11 +1858,6 @@ public unsafe class Bridge
+             (*unoExc)->pData = memExc;
+             return;
          }
-         catch (Exception e)
-         {
+-        catch (Exception e)
+-        {
 -            // FIXME
-+//            exc = e;
-         }
- 
+-        }
+-
          // convert out, in/out params
+         for (int i = 0; i < nParams; ++i)
+         {
 diff --git cli_ure/source/mono_bridge/mono_proxy.cxx cli_ure/source/mono_bridge/mono_proxy.cxx
-index 0a5f130..6004386 100644
+index 0a5f130..f4d138f 100644
 --- cli_ure/source/mono_bridge/mono_proxy.cxx
 +++ cli_ure/source/mono_bridge/mono_proxy.cxx
-@@ -191,11 +191,12 @@ inline void MonoProxy::dispatch( typelib_TypeDescription const * member_td,
-     pMonoParams[3] = uno_exc;
- 
- 	MonoObject *obj = mono_gchandle_get_target( m_managedProxy );
--
-+    OSL_TRACE("MonoProxy::dispatch( %s )", rtl::OUStringToOString( rtl::OUString( member_td->pTypeName ), RTL_TEXTENCODING_UTF8 ).getStr() );
-     mono_uno::runtime_invoke( m_managedDispatch,
+@@ -196,6 +196,6 @@ inline void MonoProxy::dispatch( typelib_TypeDescription const * member_td,
  							  obj, pMonoParams, NULL,
  							  mono_object_get_domain( obj ) );
-+    OSL_TRACE("after MonoProxy::dispatch( %s )", rtl::OUStringToOString( rtl::OUString( member_td->pTypeName ), RTL_TEXTENCODING_UTF8 ).getStr() );
  }
 -
 +    
  }
  
-diff --git cli_ure/source/mono_bridge/uno_proxy.cs cli_ure/source/mono_bridge/uno_proxy.cs
-index f292bf6..ea9b72e 100644
---- cli_ure/source/mono_bridge/uno_proxy.cs
-+++ cli_ure/source/mono_bridge/uno_proxy.cs
-@@ -176,6 +176,8 @@ public unsafe class UnoInterfaceProxy: RealProxy, IRemotingTypeInfo
-         Trace.Assert(info != null);
-         
-         string methodName = callmsg.MethodName;
-+//        Console.WriteLine( "Invoke for " +cli_uno.Cli_environment.getObjectIdentifier( this ) );
-+//        Console.WriteLine( "method name type " + methodName );
-         TypeDescriptionReference **ppAllMembers =
-         info.TypeDesc->ppAllMembers;
-         int numMembers = info.TypeDesc->nAllMembers;
-@@ -199,6 +201,7 @@ public unsafe class UnoInterfaceProxy: RealProxy, IRemotingTypeInfo
-                     String.Compare(memberTypeName, offset,
-                                    methodName, 0, methodName.Length) == 0)
-                 {
-+//                    Console.WriteLine( "member name type " + memberTypeName + " match for INTERFACEMETHOD ");
-                     TypeDescription *methodTD = null;
- 		    // FIXME release it
- 		    TypeDescriptionReference.GetDescription(&methodTD, memberTD);
-@@ -216,6 +219,7 @@ public unsafe class UnoInterfaceProxy: RealProxy, IRemotingTypeInfo
-                                           detail. cli_uno does the same */
-                                        (System.Type[])callmsg.MethodSignature,
-                                        out exception);
-+                     
-                     return ConstructReturnMessage(result, callmsg.Args,
- 						   (InterfaceMethodTypeDescription *)methodTD,
-                                                   callmsg, exception);
-diff --git cli_ure/source/ure/uno/util/WeakComponentBase.cs cli_ure/source/ure/uno/util/WeakComponentBase.cs
-index f9c2aa3..1dc668f 100644
---- cli_ure/source/ure/uno/util/WeakComponentBase.cs
-+++ cli_ure/source/ure/uno/util/WeakComponentBase.cs
-@@ -76,6 +76,7 @@ public class WeakComponentBase : WeakBase, XComponent
-     
-     ~WeakComponentBase()
-     {
-+        Console.WriteLine("~WeakComponentBase()");
-         bool doDispose;
-         lock (this)
-         {
-@@ -109,6 +110,7 @@ public class WeakComponentBase : WeakBase, XComponent
-     */
-     public void dispose()
-     {
-+        Console.WriteLine("dispose -> " + this );
-         // Determine in a thread-safe way if this is the first call to this
-         // method.  Only then we proceed with the notification of event
-         // listeners.  It is an error to call this method more then once.


More information about the ooo-build-commit mailing list