[SCM] WebKit Debian packaging branch, webkit-1.3, updated. upstream/1.3.7-4207-g178b198
commit-queue at webkit.org
commit-queue at webkit.org
Sun Feb 20 22:57:38 UTC 2011
The following commit has been merged in the webkit-1.3 branch:
commit dbca7c0f317ab880ab4795c3a1af240f1ab0bffa
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Jan 14 17:03:45 2011 +0000
2011-01-14 Joone Hur <joone.hur at collabora.co.uk>
Reviewed by David Levin.
[GTK] Convert use of raw pointers to GOwnPtr in FileSystemGtk.cpp
https://bugs.webkit.org/show_bug.cgi?id=52434
No new tests. This code will be tested when an implementation
of beginDragWithFiles is complete.
* platform/gtk/FileSystemGtk.cpp:
(WebCore::filenameToString): Use GOwnPtr instead of gchar pointer.
(WebCore::fileSystemRepresentation): Ditto.
(WebCore::filenameForDisplay): Ditto.
(WebCore::pathGetFileName): Ditto.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75797 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index 60ee13e..d6bebe2 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,19 @@
+2011-01-14 Joone Hur <joone.hur at collabora.co.uk>
+
+ Reviewed by David Levin.
+
+ [GTK] Convert use of raw pointers to GOwnPtr in FileSystemGtk.cpp
+ https://bugs.webkit.org/show_bug.cgi?id=52434
+
+ No new tests. This code will be tested when an implementation
+ of beginDragWithFiles is complete.
+
+ * platform/gtk/FileSystemGtk.cpp:
+ (WebCore::filenameToString): Use GOwnPtr instead of gchar pointer.
+ (WebCore::fileSystemRepresentation): Ditto.
+ (WebCore::filenameForDisplay): Ditto.
+ (WebCore::pathGetFileName): Ditto.
+
2011-01-14 Pavel Podivilov <podivilov at chromium.org>
Reviewed by Yury Semikhatsky.
diff --git a/Source/WebCore/platform/gtk/FileSystemGtk.cpp b/Source/WebCore/platform/gtk/FileSystemGtk.cpp
index 5116318..b3c4c9f 100644
--- a/Source/WebCore/platform/gtk/FileSystemGtk.cpp
+++ b/Source/WebCore/platform/gtk/FileSystemGtk.cpp
@@ -46,10 +46,8 @@ String filenameToString(const char* filename)
#if OS(WINDOWS)
return String::fromUTF8(filename);
#else
- gchar* escapedString = g_uri_escape_string(filename, "/:", false);
- String string(escapedString);
- g_free(escapedString);
- return string;
+ GOwnPtr<gchar> escapedString(g_uri_escape_string(filename, "/:", false));
+ return escapedString.get();
#endif
}
@@ -58,10 +56,8 @@ CString fileSystemRepresentation(const String& path)
#if OS(WINDOWS)
return path.utf8();
#else
- char* filename = g_uri_unescape_string(path.utf8().data(), 0);
- CString cfilename(filename);
- g_free(filename);
- return cfilename;
+ GOwnPtr<gchar> filename(g_uri_unescape_string(path.utf8().data(), 0));
+ return filename.get();
#endif
}
@@ -72,14 +68,11 @@ String filenameForDisplay(const String& string)
return string;
#else
CString filename = fileSystemRepresentation(string);
- gchar* display = g_filename_to_utf8(filename.data(), 0, 0, 0, 0);
+ GOwnPtr<gchar> display(g_filename_to_utf8(filename.data(), 0, 0, 0, 0));
if (!display)
return string;
- String displayString = String::fromUTF8(display);
- g_free(display);
-
- return displayString;
+ return String::fromUTF8(display.get());
#endif
}
@@ -177,11 +170,8 @@ String pathGetFileName(const String& pathName)
return pathName;
CString tmpFilename = fileSystemRepresentation(pathName);
- char* baseName = g_path_get_basename(tmpFilename.data());
- String fileName = String::fromUTF8(baseName);
- g_free(baseName);
-
- return fileName;
+ GOwnPtr<gchar> baseName(g_path_get_basename(tmpFilename.data()));
+ return String::fromUTF8(baseName.get());
}
CString applicationDirectoryPath()
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list