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):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108760
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2012-02-24 Sergio Villar Senin <svillar@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 <aestes@apple.com>
Rename [setS|s]uppressIncrementalRendering to [setS|s]uppressesIncrementalRendering and make it WebPreferences API.
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;