Title: [109708] releases/WebKitGTK/webkit-1.8/Source/WebKit2

Diff

Modified: releases/WebKitGTK/webkit-1.8/Source/WebKit2/ChangeLog (109707 => 109708)


--- releases/WebKitGTK/webkit-1.8/Source/WebKit2/ChangeLog	2012-03-05 07:50:20 UTC (rev 109707)
+++ releases/WebKitGTK/webkit-1.8/Source/WebKit2/ChangeLog	2012-03-05 07:56:04 UTC (rev 109708)
@@ -1,5 +1,19 @@
 2012-03-04  Sergio Villar Senin  <[email protected]>
 
+        [WK2] [GTK] Destructor not invoked in EditorClientFrameDestructionObserver
+        https://bugs.webkit.org/show_bug.cgi?id=79466
+
+        Reviewed by Philippe Normand.
+
+        Explicitly cast the observer before deleting it instead of just
+        deleting a generic pointer. We must to that in order to get the
+        destructor of the object properly called.
+
+        * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
+        (WebKit::EditorClientFrameDestructionObserver::destroyOnClosureFinalization):
+
+2012-03-04  Sergio Villar Senin  <[email protected]>
+
         [WK2][GTK] WebProcess SIGSEVs due to incorrect clipboard handling
         https://bugs.webkit.org/show_bug.cgi?id=79252
 

Modified: releases/WebKitGTK/webkit-1.8/Source/WebKit2/WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp (109707 => 109708)


--- releases/WebKitGTK/webkit-1.8/Source/WebKit2/WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp	2012-03-05 07:50:20 UTC (rev 109707)
+++ releases/WebKitGTK/webkit-1.8/Source/WebKit2/WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp	2012-03-05 07:56:04 UTC (rev 109708)
@@ -148,7 +148,13 @@
 private:
     GClosure* m_closure;
 
-    static void destroyOnClosureFinalization(gpointer data, GClosure* closure) { delete data; }
+    static void destroyOnClosureFinalization(gpointer data, GClosure* closure)
+    {
+        // Calling delete void* will free the memory but won't invoke
+        // the destructor, something that is a must for us.
+        EditorClientFrameDestructionObserver* observer = static_cast<EditorClientFrameDestructionObserver*>(data);
+        delete observer;
+    }
 };
 
 static Frame* frameSettingClipboard;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to