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+

Carlos Garcia Campos
Reported 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.
Attachments
Patch (2.45 KB, patch)
2014-04-28 03:40 PDT, Carlos Garcia Campos
no flags
Fix coding style (2.46 KB, patch)
2014-04-28 03:46 PDT, Carlos Garcia Campos
pnormand: review+
Carlos Garcia Campos
Comment 1 2014-04-28 03:40:59 PDT
WebKit Commit Bot
Comment 2 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
WebKit Commit Bot
Comment 3 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.
Carlos Garcia Campos
Comment 4 2014-04-28 03:46:35 PDT
Created attachment 230290 [details] Fix coding style
Carlos Garcia Campos
Comment 5 2014-04-28 04:11:06 PDT
Note You need to log in before you can comment on or make changes to this bug.