summaryrefslogtreecommitdiffstats
path: root/JavaScriptCore/wtf/gtk
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2010-04-27 16:23:55 +0100
committerSteve Block <steveblock@google.com>2010-04-27 17:07:03 +0100
commit692e5dbf12901edacf14812a6fae25462920af42 (patch)
treed62802373a429e0a9dc093b6046c166b2c514285 /JavaScriptCore/wtf/gtk
parente24bea4efef1c414137d36a9778aa4e142e10c7d (diff)
downloadexternal_webkit-692e5dbf12901edacf14812a6fae25462920af42.zip
external_webkit-692e5dbf12901edacf14812a6fae25462920af42.tar.gz
external_webkit-692e5dbf12901edacf14812a6fae25462920af42.tar.bz2
Merge webkit.org at r55033 : Initial merge by git
Change-Id: I98a4af828067cc243ec3dc5e5826154dd88074b5
Diffstat (limited to 'JavaScriptCore/wtf/gtk')
-rw-r--r--JavaScriptCore/wtf/gtk/GOwnPtr.cpp7
-rw-r--r--JavaScriptCore/wtf/gtk/GOwnPtr.h2
2 files changed, 9 insertions, 0 deletions
diff --git a/JavaScriptCore/wtf/gtk/GOwnPtr.cpp b/JavaScriptCore/wtf/gtk/GOwnPtr.cpp
index 1a151b9..da0d839 100644
--- a/JavaScriptCore/wtf/gtk/GOwnPtr.cpp
+++ b/JavaScriptCore/wtf/gtk/GOwnPtr.cpp
@@ -19,6 +19,7 @@
#include "config.h"
#include "GOwnPtr.h"
+#include <gio/gio.h>
#include <glib.h>
namespace WTF {
@@ -57,4 +58,10 @@ template <> void freeOwnedGPtr<GDir>(GDir* ptr)
if (ptr)
g_dir_close(ptr);
}
+
+template <> void freeOwnedGPtr<GFile>(GFile* ptr)
+{
+ if (ptr)
+ g_object_unref(ptr);
+}
} // namespace WTF
diff --git a/JavaScriptCore/wtf/gtk/GOwnPtr.h b/JavaScriptCore/wtf/gtk/GOwnPtr.h
index ad2c30e..1fc594c 100644
--- a/JavaScriptCore/wtf/gtk/GOwnPtr.h
+++ b/JavaScriptCore/wtf/gtk/GOwnPtr.h
@@ -35,6 +35,7 @@ typedef struct _GMutex GMutex;
typedef struct _GPatternSpec GPatternSpec;
typedef struct _GDir GDir;
typedef struct _GHashTable GHashTable;
+typedef struct _GFile GFile;
extern "C" void g_free(void*);
namespace WTF {
@@ -47,6 +48,7 @@ template<> void freeOwnedGPtr<GMutex>(GMutex*);
template<> void freeOwnedGPtr<GPatternSpec>(GPatternSpec*);
template<> void freeOwnedGPtr<GDir>(GDir*);
template<> void freeOwnedGPtr<GHashTable>(GHashTable*);
+template<> void freeOwnedGPtr<GFile>(GFile*);
template <typename T> class GOwnPtr : public Noncopyable {
public: