WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
resolvesymlinks.diff
resolvesymlinks.diff (text/plain), 4.93 KB, created by
Xan Lopez
on 2010-02-17 03:27:14 PST
(
hide
)
Description:
resolvesymlinks.diff
Filename:
MIME Type:
Creator:
Xan Lopez
Created:
2010-02-17 03:27:14 PST
Size:
4.93 KB
patch
obsolete
>From a86b641626f12445a0053200088dc2e6638a3a5e Mon Sep 17 00:00:00 2001 >From: Xan Lopez <xlopez@igalia.com> >Date: Wed, 17 Feb 2010 13:20:21 +0200 >Subject: [PATCH] WebCore: > >2010-02-17 Xan Lopez <xlopez@igalia.com> > > Reviewed by NOBODY (OOPS!). > > [Linux] Webkit incompatible with Java plugins > https://bugs.webkit.org/show_bug.cgi?id=24912 > > Resolve symlinks before trying to load plugins as modules, since > GModule won't do it. > > * plugins/gtk/PluginPackageGtk.cpp: > (WebCore::PluginPackage::load): > >JavaScriptCore: > >2010-02-17 Xan Lopez <xlopez@igalia.com> > > Reviewed by NOBODY (OOPS!). > > [Linux] Webkit incompatible with Java plugins > https://bugs.webkit.org/show_bug.cgi?id=24912 > > Add support for GFile to GOwnPtr. > > * wtf/gtk/GOwnPtr.cpp: > (WTF::GFile): > * wtf/gtk/GOwnPtr.h: >--- > JavaScriptCore/ChangeLog | 13 +++++++++++++ > JavaScriptCore/wtf/gtk/GOwnPtr.cpp | 7 +++++++ > JavaScriptCore/wtf/gtk/GOwnPtr.h | 2 ++ > WebCore/ChangeLog | 13 +++++++++++++ > WebCore/plugins/gtk/PluginPackageGtk.cpp | 13 ++++++++++++- > 5 files changed, 47 insertions(+), 1 deletions(-) > >diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog >index f1cdbc7..6efdeb1 100644 >--- a/JavaScriptCore/ChangeLog >+++ b/JavaScriptCore/ChangeLog >@@ -1,3 +1,16 @@ >+2010-02-17 Xan Lopez <xlopez@igalia.com> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ [Linux] Webkit incompatible with Java plugins >+ https://bugs.webkit.org/show_bug.cgi?id=24912 >+ >+ Add support for GFile to GOwnPtr. >+ >+ * wtf/gtk/GOwnPtr.cpp: >+ (WTF::GFile): >+ * wtf/gtk/GOwnPtr.h: >+ > 2010-02-16 Gavin Barraclough <barraclough@apple.com> > > Reviewed by Mark Rowe. >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: >diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog >index 4c6be7a..d2dcea4 100644 >--- a/WebCore/ChangeLog >+++ b/WebCore/ChangeLog >@@ -1,3 +1,16 @@ >+2010-02-17 Xan Lopez <xlopez@igalia.com> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ [Linux] Webkit incompatible with Java plugins >+ https://bugs.webkit.org/show_bug.cgi?id=24912 >+ >+ Resolve symlinks before trying to load plugins as modules, since >+ GModule won't do it. >+ >+ * plugins/gtk/PluginPackageGtk.cpp: >+ (WebCore::PluginPackage::load): >+ > 2010-02-16 Chris Evans <cevans@chromium.org> > > Reviewed by Adam Barth. >diff --git a/WebCore/plugins/gtk/PluginPackageGtk.cpp b/WebCore/plugins/gtk/PluginPackageGtk.cpp >index bcbd519..b25db03 100644 >--- a/WebCore/plugins/gtk/PluginPackageGtk.cpp >+++ b/WebCore/plugins/gtk/PluginPackageGtk.cpp >@@ -29,9 +29,11 @@ > #include "config.h" > #include "PluginPackage.h" > >+#include <gio/gio.h> > #include <stdio.h> > > #include "CString.h" >+#include "GOwnPtr.h" > #include "MIMETypeRegistry.h" > #include "NotImplemented.h" > #include "npruntime_impl.h" >@@ -105,7 +107,16 @@ bool PluginPackage::load() > return true; > } > >- m_module = g_module_open((m_path.utf8()).data(), G_MODULE_BIND_LOCAL); >+ GOwnPtr<gchar> finalPath(g_strdup(m_path.utf8().data())); >+ while (g_file_test(finalPath.get(), G_FILE_TEST_IS_SYMLINK)) { >+ GOwnPtr<GFile> file(g_file_new_for_path(finalPath.get())); >+ GOwnPtr<gchar> linkPath(g_file_read_link(finalPath.get(), 0)); >+ >+ GOwnPtr<GFile> resolvedFile(g_file_resolve_relative_path(file.get(), linkPath.get())); >+ finalPath.set(g_file_get_path(resolvedFile.get())); >+ } >+ >+ m_module = g_module_open(finalPath.get(), G_MODULE_BIND_LOCAL); > > if (!m_module) { > LOG(Plugins,"Module Load Failed :%s, Error:%s\n", (m_path.utf8()).data(), g_module_error()); >-- >1.6.6 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 24912
:
48873
| 48883 |
48886
|
48892
|
48897