Changeset 83728 in webkit


Ignore:
Timestamp:
Apr 13, 2011 7:05:15 AM (13 years ago)
Author:
commit-queue@webkit.org
Message:

2011-04-13 Gustavo Noronha Silva <Gustavo Noronha Silva>

Reviewed by Martin Robinson.

[GTK] PluginPackage should check whether a plugin mixes GTK+ 2 and 3 symbols itself
https://bugs.webkit.org/show_bug.cgi?id=58297

Make sure we do not load plugins that use symbols of a different
GTK+ major version to avoid bugs and crashes.

  • plugins/gtk/PluginPackageGtk.cpp: (WebCore::moduleMixesGtkSymbols): (WebCore::PluginPackage::load):

2011-04-13 Gustavo Noronha Silva <Gustavo Noronha Silva>

Reviewed by Martin Robinson.

[GTK] PluginPackage should check whether a plugin mixes GTK+ 2 and 3 symbols itself
https://bugs.webkit.org/show_bug.cgi?id=58297

Do not disable flash specifically when built with GTK+ 3 -
PluginPackage should do the right thing while loading plugins.

  • GtkLauncher/main.c: (main):
Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r83725 r83728  
     12011-04-13  Gustavo Noronha Silva  <gns@gnome.org>
     2
     3        Reviewed by Martin Robinson.
     4
     5        [GTK] PluginPackage should check whether a plugin mixes GTK+ 2 and 3 symbols itself
     6        https://bugs.webkit.org/show_bug.cgi?id=58297
     7
     8        Make sure we do not load plugins that use symbols of a different
     9        GTK+ major version to avoid bugs and crashes.
     10
     11        * plugins/gtk/PluginPackageGtk.cpp:
     12        (WebCore::moduleMixesGtkSymbols):
     13        (WebCore::PluginPackage::load):
     14
    1152011-04-13  Andrey Adaikin  <aandrey@google.com>
    216
  • trunk/Source/WebCore/plugins/gtk/PluginPackageGtk.cpp

    r79580 r83728  
    120120#endif
    121121
     122static bool moduleMixesGtkSymbols(GModule* module)
     123{
     124    gpointer symbol;
     125#ifdef GTK_API_VERSION_2
     126    return g_module_symbol(module, "gtk_application_get_type", &symbol);
     127#else
     128    return g_module_symbol(module, "gtk_object_get_type", &symbol);
     129#endif
     130}
     131
     132
    122133bool PluginPackage::load()
    123134{
     
    151162    }
    152163
     164    if (moduleMixesGtkSymbols(m_module)) {
     165        LOG(Plugins, "Module '%s' mixes GTK+ 2 and GTK+ 3 symbols, ignoring plugin.\n", m_path.utf8().data());
     166        g_module_close(m_module);
     167        return false;
     168    }
     169
    153170    m_isLoaded = true;
    154171
  • trunk/Tools/ChangeLog

    r83701 r83728  
     12011-04-13  Gustavo Noronha Silva  <gns@gnome.org>
     2
     3        Reviewed by Martin Robinson.
     4
     5        [GTK] PluginPackage should check whether a plugin mixes GTK+ 2 and 3 symbols itself
     6        https://bugs.webkit.org/show_bug.cgi?id=58297
     7
     8        Do not disable flash specifically when built with GTK+ 3 -
     9        PluginPackage should do the right thing while loading plugins.
     10
     11        * GtkLauncher/main.c:
     12        (main):
     13
    1142011-04-12  Kent Tamura  <tkent@chromium.org>
    215
  • trunk/Tools/GtkLauncher/main.c

    r74685 r83728  
    231231}
    232232
    233 #ifndef GTK_API_VERSION_2
    234 static void disablePlugin(const char* pluginName)
    235 {
    236     WebKitWebPluginDatabase *database = webkit_get_web_plugin_database();
    237     GSList *plugins = webkit_web_plugin_database_get_plugins(database);
    238     GSList *p;
    239 
    240     for (p = plugins; p; p = g_slist_next(p)) {
    241         WebKitWebPlugin *plugin = WEBKIT_WEB_PLUGIN(p->data);
    242 
    243         if (!g_strcmp0(webkit_web_plugin_get_name(plugin), pluginName))
    244             webkit_web_plugin_set_enabled(plugin, FALSE);
    245     }
    246 
    247     webkit_web_plugin_database_plugins_list_free(plugins);
    248 }
    249 #endif
    250 
    251233int main(int argc, char* argv[])
    252234{
     
    258240        g_thread_init(NULL);
    259241
    260 #ifndef GTK_API_VERSION_2
    261     disablePlugin("Shockwave Flash");
    262 #endif
    263 
    264242    main_window = createWindow(&webView);
    265243
Note: See TracChangeset for help on using the changeset viewer.