2008-05-02 Mike Kestner <mkestner@novell.com>

* glib/Object.cs: Don't bother hooking VM into the class field
	if another managed ancestor has already done so.  Add a LogFunc
	printing a stack trace for the GObject log domain if GTK_SHARP_DEBUG
	is set in the environment.  It's a bit noisy to do unconditionally.

svn path=/trunk/gtk-sharp/; revision=102349
This commit is contained in:
Mike Kestner 2008-05-02 16:58:46 +00:00
parent 9bc789f2e6
commit b9d94385a6
2 changed files with 21 additions and 3 deletions

View File

@ -1,3 +1,10 @@
2008-05-02 Mike Kestner <mkestner@novell.com>
* glib/Object.cs: Don't bother hooking VM into the class field
if another managed ancestor has already done so. Add a LogFunc
printing a stack trace for the GObject log domain if GTK_SHARP_DEBUG
is set in the environment. It's a bit noisy to do unconditionally.
2008-05-02 Mike Kestner <mkestner@novell.com>
* gtk/Object.custom: some NULL guarding in Dispose and

View File

@ -139,6 +139,18 @@ namespace GLib {
if (baseinfo == minfo)
continue;
bool ignore = false;
for (Type parent = t.BaseType; parent != baseinfo.DeclaringType; parent = parent.BaseType) {
MethodInfo pinfo = parent.GetMethod (minfo.Name, BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.DeclaredOnly);
if (pinfo != null) {
ignore = true;
break;
}
}
if (ignore)
continue;
foreach (object attr in baseinfo.GetCustomAttributes (typeof (DefaultSignalHandlerAttribute), false)) {
DefaultSignalHandlerAttribute sigattr = attr as DefaultSignalHandlerAttribute;
MethodInfo connector = sigattr.Type.GetMethod (sigattr.ConnectionMethod, BindingFlags.Static | BindingFlags.NonPublic);
@ -521,11 +533,10 @@ namespace GLib {
tref.Harden ();
}
#if false
static Object ()
{
GLib.Log.SetLogHandler ("GLib-GObject", GLib.LogLevelFlags.All, GLib.Log.PrintTraceLogFunction);
if (Environment.GetEnvironmentVariable ("GTK_SHARP_DEBUG") != null)
GLib.Log.SetLogHandler ("GLib-GObject", GLib.LogLevelFlags.All, GLib.Log.PrintTraceLogFunction);
}
#endif
}
}