Changeset 167795 in webkit


Ignore:
Timestamp:
Apr 25, 2014 12:58:31 AM (10 years ago)
Author:
Carlos Garcia Campos
Message:

[GTK] Plugin process crashes with GTK2 windowed plugins
https://bugs.webkit.org/show_bug.cgi?id=132127

Reviewed by Martin Robinson.

It happens sometimes because the socket is used before the plug
has been added. A runtime critical warnings is shown and it
sometimes ends up crashing.

  • WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:

(WebKit::NetscapePlugin::platformPostInitializeWindowed): Do not
show the plug widget until the socket is connected.

Location:
trunk/Source/WebKit2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r167793 r167795  
     12014-04-25  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        [GTK] Plugin process crashes with GTK2 windowed plugins
     4        https://bugs.webkit.org/show_bug.cgi?id=132127
     5
     6        Reviewed by Martin Robinson.
     7
     8        It happens sometimes because the socket is used before the plug
     9        has been added. A runtime critical warnings is shown and it
     10        sometimes ends up crashing.
     11
     12        * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
     13        (WebKit::NetscapePlugin::platformPostInitializeWindowed): Do not
     14        show the plug widget until the socket is connected.
     15
    1162014-04-24  Andreas Kling  <akling@apple.com>
    217
  • trunk/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp

    r163380 r167795  
    151151    m_platformPluginWidget = gtk_plug_new(static_cast<Window>(windowID));
    152152    GtkWidget* socket = gtk_socket_new();
    153     g_signal_connect(socket, "plug-removed", G_CALLBACK(socketPlugRemovedCallback), 0);
     153    // Do not show the plug widget until the socket is connected.
     154    g_signal_connect_swapped(socket, "plug-added", G_CALLBACK(gtk_widget_show), m_platformPluginWidget);
     155    g_signal_connect(socket, "plug-removed", G_CALLBACK(socketPlugRemovedCallback), nullptr);
    154156    gtk_container_add(GTK_CONTAINER(m_platformPluginWidget), socket);
    155157    gtk_widget_show(socket);
    156     gtk_widget_show(m_platformPluginWidget);
    157158
    158159    m_npWindow.window = GINT_TO_POINTER(gtk_socket_get_id(GTK_SOCKET(socket)));
Note: See TracChangeset for help on using the changeset viewer.