Bug 21197 - SVN trunk (Revision: 36997) crashes after loading Flash Plugin
Summary: SVN trunk (Revision: 36997) crashes after loading Flash Plugin
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P1 Normal
Assignee: Nobody
URL: http://youtube.com
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-28 10:52 PDT by Vitaly Davidenko
Modified: 2008-11-10 12:00 PST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vitaly Davidenko 2008-09-28 10:52:13 PDT
In the file WebCore/plugins/gtk/PluginViewGtk.cpp the function PluginView::init() crashes on the line 
'ws->display = GDK_WINDOW_XDISPLAY(platformPluginWidget()->window);'
because of the platformPluginWidget()->window is 0.

Looks like the init code is expecting not null containingWindow() on the line
'gtk_container_add(GTK_CONTAINER(containingWindow()), platformPluginWidget());'

 I have modified the file WebCore/platform/ScrollView.cpp as a workaround(not tested, only to provide correct value of containingWindow() ). After modification below, flash is displayed.

$ svn diff WebCore/platform/ScrollView.cpp
Index: WebCore/platform/ScrollView.cpp
===================================================================
--- WebCore/platform/ScrollView.cpp	(revision 36997)
+++ WebCore/platform/ScrollView.cpp	(working copy)
@@ -43,12 +43,12 @@
 void ScrollView::addChild(Widget* child) 
 {
     ASSERT(child != this && !child->parent());
-    child->setParent(this);
-    m_children.add(child);
     if (!child->platformWidget()) {
         child->setContainingWindow(containingWindow());
-        return;
+//        return;
     }
+    child->setParent(this);
+    m_children.add(child);
     platformAddChild(child);
 }
Comment 1 Alp Toker 2008-11-07 20:41:16 PST
There was a related fix in r37447 but that may not fix the reported issue.

Is this still reproducible on trunk?
Comment 2 Vitaly Davidenko 2008-11-10 12:00:53 PST
(In reply to comment #1)
> There was a related fix in r37447 but that may not fix the reported issue.
> 
> Is this still reproducible on trunk?
> 

This is not reproducible on Revision: 38244
Web pages with flash content are loaded successfully (using Adobe flash player version 10).