Title: [98224] trunk/Source/WebKit2
- Revision
- 98224
- Author
- [email protected]
- Date
- 2011-10-24 01:54:25 -0700 (Mon, 24 Oct 2011)
Log Message
[GTK] [WK2] Memory leaks in WebContextGtk.cpp
https://bugs.webkit.org/show_bug.cgi?id=70505
Free the output of g_build_filename()
Patch by Sudarsana Nagineni <[email protected]> on 2011-10-24
Reviewed by Martin Robinson.
* UIProcess/gtk/WebContextGtk.cpp:
(WebKit::WebContext::platformDefaultDatabaseDirectory):
(WebKit::WebContext::platformDefaultLocalStorageDirectory):
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (98223 => 98224)
--- trunk/Source/WebKit2/ChangeLog 2011-10-24 08:52:09 UTC (rev 98223)
+++ trunk/Source/WebKit2/ChangeLog 2011-10-24 08:54:25 UTC (rev 98224)
@@ -1,3 +1,16 @@
+2011-10-24 Sudarsana Nagineni <[email protected]>
+
+ [GTK] [WK2] Memory leaks in WebContextGtk.cpp
+ https://bugs.webkit.org/show_bug.cgi?id=70505
+
+ Free the output of g_build_filename()
+
+ Reviewed by Martin Robinson.
+
+ * UIProcess/gtk/WebContextGtk.cpp:
+ (WebKit::WebContext::platformDefaultDatabaseDirectory):
+ (WebKit::WebContext::platformDefaultLocalStorageDirectory):
+
2011-10-23 Mark Hahnenberg <[email protected]>
Remove getConstructDataVirtual
Modified: trunk/Source/WebKit2/UIProcess/gtk/WebContextGtk.cpp (98223 => 98224)
--- trunk/Source/WebKit2/UIProcess/gtk/WebContextGtk.cpp 2011-10-24 08:52:09 UTC (rev 98223)
+++ trunk/Source/WebKit2/UIProcess/gtk/WebContextGtk.cpp 2011-10-24 08:54:25 UTC (rev 98224)
@@ -26,6 +26,8 @@
#include "config.h"
#include "WebContext.h"
+#include <WebCore/FileSystem.h>
+#include <wtf/gobject/GOwnPtr.h>
#include "ApplicationCacheStorage.h"
@@ -46,7 +48,8 @@
String WebContext::platformDefaultDatabaseDirectory() const
{
- return WTF::String::fromUTF8(g_build_filename(g_get_user_data_dir(), "webkit", "databases", NULL));
+ GOwnPtr<gchar> databaseDirectory(g_build_filename(g_get_user_data_dir(), "webkit", "databases", NULL));
+ return WebCore::filenameToString(databaseDirectory.get());
}
String WebContext::platformDefaultIconDatabasePath() const
@@ -57,7 +60,8 @@
String WebContext::platformDefaultLocalStorageDirectory() const
{
- return WTF::String::fromUTF8(g_build_filename(g_get_user_data_dir(), "webkit", "localstorage", NULL));
+ GOwnPtr<gchar> storageDirectory(g_build_filename(g_get_user_data_dir(), "webkit", "localstorage", NULL));
+ return WebCore::filenameToString(storageDirectory.get());
}
} // namespace WebKit
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes