[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-10851-g50815da
commit-queue at webkit.org
commit-queue at webkit.org
Wed Dec 22 18:36:20 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 9dcdf7e9a9256a894f578f5b6527dafa077bd10f
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Dec 14 15:55:24 2010 +0000
2010-12-14 Carlos Garcia Campos <cgarcia at igalia.com>
Reviewed by Xan Lopez.
[GTK] Fix several issues in r73858
https://bugs.webkit.org/show_bug.cgi?id=51032
- It uses both glib private data and it allocates its own private
structure.
- It calls parent's dispose method from finalize.
- webkit_web_plugin_get_mimetypes() uses a wrong annotation for the
returned value, it should be transfer none rather than transfer
container.
- Since the mime type list is internal and we return the list and not a
copy, it should never be freed by the caller, so
webkit_web_plugin_mime_type_list_free() should be removed from the
public API.
- Mime types list is used uninitialized.
- Mention in the docs that list returned by
webkit_web_plugin_database_get_plugins() must be freed with
webkit_web_plugin_database_plugins_list_free().
* webkit/webkitwebplugin.cpp:
(webkit_web_plugin_finalize):
(webkit_web_plugin_class_init):
(webkit_web_plugin_init):
* webkit/webkitwebplugin.h:
* webkit/webkitwebplugindatabase.cpp:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74026 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/gtk/ChangeLog b/WebKit/gtk/ChangeLog
index 1894287..9fe543d 100644
--- a/WebKit/gtk/ChangeLog
+++ b/WebKit/gtk/ChangeLog
@@ -1,3 +1,32 @@
+2010-12-14 Carlos Garcia Campos <cgarcia at igalia.com>
+
+ Reviewed by Xan Lopez.
+
+ [GTK] Fix several issues in r73858
+ https://bugs.webkit.org/show_bug.cgi?id=51032
+
+ - It uses both glib private data and it allocates its own private
+ structure.
+ - It calls parent's dispose method from finalize.
+ - webkit_web_plugin_get_mimetypes() uses a wrong annotation for the
+ returned value, it should be transfer none rather than transfer
+ container.
+ - Since the mime type list is internal and we return the list and not a
+ copy, it should never be freed by the caller, so
+ webkit_web_plugin_mime_type_list_free() should be removed from the
+ public API.
+ - Mime types list is used uninitialized.
+ - Mention in the docs that list returned by
+ webkit_web_plugin_database_get_plugins() must be freed with
+ webkit_web_plugin_database_plugins_list_free().
+
+ * webkit/webkitwebplugin.cpp:
+ (webkit_web_plugin_finalize):
+ (webkit_web_plugin_class_init):
+ (webkit_web_plugin_init):
+ * webkit/webkitwebplugin.h:
+ * webkit/webkitwebplugindatabase.cpp:
+
2010-12-14 Diego Escalante Urrelo <descalante at igalia.com>
Reviewed by Xan Lopez.
diff --git a/WebKit/gtk/webkit/webkitwebplugin.cpp b/WebKit/gtk/webkit/webkitwebplugin.cpp
index 5d08b4d..699cd5f 100644
--- a/WebKit/gtk/webkit/webkitwebplugin.cpp
+++ b/WebKit/gtk/webkit/webkitwebplugin.cpp
@@ -45,23 +45,17 @@ static void freeMIMEType(WebKitWebPluginMIMEType* mimeType)
g_slice_free(WebKitWebPluginMIMEType, mimeType);
}
-void webkit_web_plugin_mime_type_list_free(GSList* list)
-{
- for (GSList* p = list; p; p = p->next)
- freeMIMEType((WebKitWebPluginMIMEType*)p->data);
- g_slist_free(list);
-}
-
static void webkit_web_plugin_finalize(GObject* object)
{
- WebKitWebPluginPrivate* priv = WEBKIT_WEB_PLUGIN(object)->priv;
+ WebKitWebPlugin* plugin = WEBKIT_WEB_PLUGIN(object);
+ WebKitWebPluginPrivate* priv = plugin->priv;
- if (priv->mimeTypes)
- webkit_web_plugin_mime_type_list_free(priv->mimeTypes);
+ g_slist_foreach(priv->mimeTypes, (GFunc)freeMIMEType, 0);
+ g_slist_free(priv->mimeTypes);
- delete WEBKIT_WEB_PLUGIN(object)->priv;
+ delete plugin->priv;
- G_OBJECT_CLASS(webkit_web_plugin_parent_class)->dispose(object);
+ G_OBJECT_CLASS(webkit_web_plugin_parent_class)->finalize(object);
}
static void webkit_web_plugin_get_property(GObject* object, guint prop_id, GValue* value, GParamSpec* paramSpec)
@@ -107,14 +101,12 @@ static void webkit_web_plugin_class_init(WebKitWebPluginClass* klass)
_("Whether the plugin is enabled"),
FALSE,
WEBKIT_PARAM_READWRITE));
-
- g_type_class_add_private(klass, sizeof(WebKitWebPluginPrivate));
}
static void webkit_web_plugin_init(WebKitWebPlugin *plugin)
{
- WebKitWebPluginPrivate* priv = G_TYPE_INSTANCE_GET_PRIVATE(plugin, WEBKIT_TYPE_WEB_PLUGIN, WebKitWebPluginPrivate);
- plugin->priv = priv = new WebKitWebPluginPrivate();
+ plugin->priv = new WebKitWebPluginPrivate();
+ plugin->priv->mimeTypes = 0;
}
namespace WebKit {
@@ -175,7 +167,7 @@ const char* webkit_web_plugin_get_description(WebKitWebPlugin* plugin)
* Returns all the #WebKitWebPluginMIMEType that @plugin is handling
* at the moment.
*
- * Returns: (transfer container) (element-type WebKitWebPluginMIMEType): a #GSList of #WebKitWebPluginMIMEType
+ * Returns: (transfer none) (element-type WebKitWebPluginMIMEType): a #GSList of #WebKitWebPluginMIMEType
*
* Since: 1.3.8
*/
diff --git a/WebKit/gtk/webkit/webkitwebplugin.h b/WebKit/gtk/webkit/webkitwebplugin.h
index 28b96e1..3514d1e 100644
--- a/WebKit/gtk/webkit/webkitwebplugin.h
+++ b/WebKit/gtk/webkit/webkitwebplugin.h
@@ -54,9 +54,6 @@ typedef struct _WebKitWebPluginMIMEType {
char** extensions;
} WebKitWebPluginMIMEType;
-WEBKIT_API void
-webkit_web_plugin_mime_type_list_free (GSList*);
-
struct _WebKitWebPluginClass {
GObjectClass parentClass;
};
diff --git a/WebKit/gtk/webkit/webkitwebplugindatabase.cpp b/WebKit/gtk/webkit/webkitwebplugindatabase.cpp
index a44fedc..afc3ceb 100644
--- a/WebKit/gtk/webkit/webkitwebplugindatabase.cpp
+++ b/WebKit/gtk/webkit/webkitwebplugindatabase.cpp
@@ -76,6 +76,7 @@ void webkit_web_plugin_database_plugins_list_free(GSList* list)
* @database: a #WebKitWebPluginDatabase
*
* Returns all #WebKitWebPlugin available in @database.
+ * The returned list must be freed with webkit_web_plugin_database_plugins_list_free()
*
* Returns: (transfer full) (element-type WebKitWebPlugin): a #GSList of #WebKitWebPlugin
*
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list