diff options
author | Ben Murdoch <benm@google.com> | 2010-06-15 19:36:43 +0100 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2010-06-16 14:52:28 +0100 |
commit | 545e470e52f0ac6a3a072bf559c796b42c6066b6 (patch) | |
tree | c0c14763654d84d37577dde512c3d3b4699a9e86 /WebCore/platform/gtk/SharedBufferGtk.cpp | |
parent | 719298a66237d38ea5c05f1547123ad8aacbc237 (diff) | |
download | external_webkit-545e470e52f0ac6a3a072bf559c796b42c6066b6.zip external_webkit-545e470e52f0ac6a3a072bf559c796b42c6066b6.tar.gz external_webkit-545e470e52f0ac6a3a072bf559c796b42c6066b6.tar.bz2 |
Merge webkit.org at r61121: Initial merge by git.
Change-Id: Icd6db395c62285be384d137164d95d7466c98760
Diffstat (limited to 'WebCore/platform/gtk/SharedBufferGtk.cpp')
-rw-r--r-- | WebCore/platform/gtk/SharedBufferGtk.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/WebCore/platform/gtk/SharedBufferGtk.cpp b/WebCore/platform/gtk/SharedBufferGtk.cpp index db04d80..c7040f2 100644 --- a/WebCore/platform/gtk/SharedBufferGtk.cpp +++ b/WebCore/platform/gtk/SharedBufferGtk.cpp @@ -32,19 +32,17 @@ PassRefPtr<SharedBuffer> SharedBuffer::createWithContentsOfFile(const String& fi if (filePath.isEmpty()) return 0; - gchar* filename = filenameFromString(filePath); + CString filename = fileSystemRepresentation(filePath); gchar* contents; gsize size; GError* error = 0; - if (!g_file_get_contents(filename, &contents, &size, &error)) { + if (!g_file_get_contents(filename.data(), &contents, &size, &error)) { LOG_ERROR("Failed to fully read contents of file %s - %s", filenameForDisplay(filePath).utf8().data(), error->message); g_error_free(error); - g_free(filename); return 0; } RefPtr<SharedBuffer> result = SharedBuffer::create(contents, size); - g_free(filename); g_free(contents); return result.release(); |