Author: everaldo
Date: 2007-06-10 04:49:06 -0400 (Sun, 10 Jun 2007)
New Revision: 79113

Modified:
   trunk/moon/plugin/ChangeLog
   trunk/moon/plugin/moon-plugin.cpp
   trunk/moon/plugin/plugin-class.cpp
   trunk/moon/plugin/plugin-glue.cpp
Log:
2007-06-10  Everaldo Canuto  <[EMAIL PROTECTED]>

        * plugin-glue.cpp: Call plugin instance destructor, now it dont causes
        error when you reload page.

        * moon-plugin.cpp: Only destroy container widget, if you dont destroy it
        when you start with page plugin, go to another page and close browser,
        a segfault is emited before browser exits. Now navigating for some time 
in
        silverlight pages looks to dont emit segfault if scripting is disabled.

        * plugin-class.cpp: Remove debug message from class constructor.



Modified: trunk/moon/plugin/ChangeLog
===================================================================
--- trunk/moon/plugin/ChangeLog 2007-06-10 08:18:53 UTC (rev 79112)
+++ trunk/moon/plugin/ChangeLog 2007-06-10 08:49:06 UTC (rev 79113)
@@ -1,3 +1,15 @@
+2007-06-10  Everaldo Canuto  <[EMAIL PROTECTED]>
+
+       * plugin-glue.cpp: Call plugin instance destructor, now it dont causes
+       error when you reload page.
+
+       * moon-plugin.cpp: Only destroy container widget, if you dont destroy it
+       when you start with page plugin, go to another page and close browser,
+       a segfault is emited before browser exits. Now navigating for some time 
in
+       silverlight pages looks to dont emit segfault if scripting is disabled.
+
+       * plugin-class.cpp: Remove debug message from class constructor.
+
 2007-06-09  Everaldo Canuto  <[EMAIL PROTECTED]>
 
        [Xaml support]

Modified: trunk/moon/plugin/moon-plugin.cpp
===================================================================
--- trunk/moon/plugin/moon-plugin.cpp   2007-06-10 08:18:53 UTC (rev 79112)
+++ trunk/moon/plugin/moon-plugin.cpp   2007-06-10 08:49:06 UTC (rev 79113)
@@ -80,9 +80,9 @@
 
 PluginInstance::PluginInstance (NPP instance, uint16 mode)
 {
-    this->mode = mode;
-    this->instance = instance;
-    this->window = NULL;
+       this->mode = mode;
+       this->instance = instance;
+       this->window = NULL;
        this->object = NULL;
 
        this->container = NULL;
@@ -95,17 +95,9 @@
 
 PluginInstance::~PluginInstance ()
 {
-       DEBUGMSG ("destructor point 1");
-       if (this->surface != NULL)
-               //gtk_container_remove (GTK_CONTAINER (container), 
this->surface->drawing_area);
-               surface_destroy (this->surface);
-       DEBUGMSG ("destructor point 2");
-       if (this->canvas != NULL)
-               delete (this->canvas);
-       DEBUGMSG ("destructor point 3");
+       // Container must be destroyed or we have segfault when browser's 
closes.
        if (this->container != NULL)
                gtk_widget_destroy (this->container);
-       DEBUGMSG ("destructor point 4 (end)");
 
 #ifdef SCRIPTING 
        DEBUGMSG ("destructor point object (%x) (%d)", this->object, 
this->object->referenceCount);

Modified: trunk/moon/plugin/plugin-class.cpp
===================================================================
--- trunk/moon/plugin/plugin-class.cpp  2007-06-10 08:18:53 UTC (rev 79112)
+++ trunk/moon/plugin/plugin-class.cpp  2007-06-10 08:49:06 UTC (rev 79113)
@@ -118,8 +118,6 @@
 
 PluginClass::PluginClass ()
 {
-       fprintf (stderr, "*** PluginClass::PluginClass\n");
-
        this->allocate       = &RuntimeClassAllocate;
        this->deallocate     = &RuntimeClassDeallocate;
        this->invalidate     = &RuntimeClassInvalidate;

Modified: trunk/moon/plugin/plugin-glue.cpp
===================================================================
--- trunk/moon/plugin/plugin-glue.cpp   2007-06-10 08:18:53 UTC (rev 79112)
+++ trunk/moon/plugin/plugin-glue.cpp   2007-06-10 08:49:06 UTC (rev 79113)
@@ -42,11 +42,8 @@
                return NPERR_INVALID_INSTANCE_ERROR;
 
        PluginInstance *plugin = (PluginInstance *) instance->pdata;
+       delete plugin;
 
-       // TODO: This line causes problems when we are in scriptable mode, so 
will 
-       // be commented for now.
-       //delete plugin;
-
        instance->pdata = NULL;
 
        return NPERR_NO_ERROR;

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to