Title: [108760] trunk/Source/WebKit2
- Revision
- 108760
- Author
- ser...@webkit.org
- Date
- 2012-02-24 02:19:42 -0800 (Fri, 24 Feb 2012)
Log Message
[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):
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (108759 => 108760)
--- trunk/Source/WebKit2/ChangeLog 2012-02-24 10:12:46 UTC (rev 108759)
+++ trunk/Source/WebKit2/ChangeLog 2012-02-24 10:19:42 UTC (rev 108760)
@@ -1,3 +1,17 @@
+2012-02-24 Sergio Villar Senin <svil...@igalia.com>
+
+ [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-02-23 Andy Estes <aes...@apple.com>
Rename [setS|s]uppressIncrementalRendering to [setS|s]uppressesIncrementalRendering and make it WebPreferences API.
Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp (108759 => 108760)
--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp 2012-02-24 10:12:46 UTC (rev 108759)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp 2012-02-24 10:19:42 UTC (rev 108760)
@@ -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
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes