Bug 132252

Summary: [GTK] Crash in debug build with removing windowed plugin child widgets from the view
Product: WebKit Reporter: Carlos Garcia Campos <cgarcia>
Component: WebKit2Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: berto, commit-queue, gustavo, mrobinson, pnormand, zan
Priority: P2 Keywords: Gtk
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Fix coding style pnormand: review+

Description Carlos Garcia Campos 2014-04-28 03:37:20 PDT
It crashes due to an assert in HashTable that checks the iterators validity. The problem is that we are iterating the children map and the callback called on every iterator might modify the map, making the iterators invalid. This happens when the web view is destroyed, GtkContainer calls gtk_container_foreach() with gtk_widget_destroy as callback. When a widget inside a container is destroyed, it's removed from the container, and in our case, the child widget is removed from the map. This is causing several crashes when running layout tests in debug bot.
Comment 1 Carlos Garcia Campos 2014-04-28 03:40:59 PDT
Created attachment 230289 [details]
Patch
Comment 2 WebKit Commit Bot 2014-04-28 03:43:00 PDT
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Comment 3 WebKit Commit Bot 2014-04-28 03:43:11 PDT
Attachment 230289 [details] did not pass style-queue:


ERROR: Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp:368:  Multi line control clauses should use braces.  [whitespace/braces] [4]
Total errors found: 1 in 2 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 Carlos Garcia Campos 2014-04-28 03:46:35 PDT
Created attachment 230290 [details]
Fix coding style
Comment 5 Carlos Garcia Campos 2014-04-28 04:11:06 PDT
Committed r167883: <http://trac.webkit.org/changeset/167883>