[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.21-584-g1e41756

xan at webkit.org xan at webkit.org
Fri Feb 26 22:22:46 UTC 2010


The following commit has been merged in the webkit-1.1 branch:
commit 515aa83f6dbb07c9a4519af45156b2a256c829cf
Author: xan at webkit.org <xan at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Feb 17 13:46:05 2010 +0000

    WebCore:
    
    2010-02-17  Xan Lopez  <xlopez at igalia.com>
    
            Reviewed by Gustavo Noronha.
    
            [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.
    
            Based on original work by Gustavo Noronha.
    
            * plugins/gtk/PluginPackageGtk.cpp:
            (WebCore::PluginPackage::load):
    
    JavaScriptCore:
    
    2010-02-17  Xan Lopez  <xlopez at igalia.com>
    
            Reviewed by Gustavo Noronha.
    
            [Linux] Webkit incompatible with Java plugins
            https://bugs.webkit.org/show_bug.cgi?id=24912
    
            Add support for GFile to GOwnPtr.
    
            Based on original work by Gustavo Noronha.
    
            * wtf/gtk/GOwnPtr.cpp:
            (WTF::GFile):
            * wtf/gtk/GOwnPtr.h:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@54887 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog
index f1cdbc7..e2f3ce7 100644
--- a/JavaScriptCore/ChangeLog
+++ b/JavaScriptCore/ChangeLog
@@ -1,3 +1,18 @@
+2010-02-17  Xan Lopez  <xlopez at igalia.com>
+
+        Reviewed by Gustavo Noronha.
+
+        [Linux] Webkit incompatible with Java plugins
+        https://bugs.webkit.org/show_bug.cgi?id=24912
+
+        Add support for GFile to GOwnPtr.
+
+        Based on original work by Gustavo Noronha.
+
+        * wtf/gtk/GOwnPtr.cpp:
+        (WTF::GFile):
+        * wtf/gtk/GOwnPtr.h:
+
 2010-02-16  Gavin Barraclough  <barraclough at 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 505a606..32ce7f2 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,18 @@
+2010-02-17  Xan Lopez  <xlopez at igalia.com>
+
+        Reviewed by Gustavo Noronha.
+
+        [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.
+
+        Based on original work by Gustavo Noronha.
+
+        * plugins/gtk/PluginPackageGtk.cpp:
+        (WebCore::PluginPackage::load):
+
 2010-02-17  Gustavo Noronha Silva  <gustavo.noronha at collabora.co.uk>
 
         Reviewed by Xan Lopez.
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());

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list