Bug 132252 - [GTK] Crash in debug build with removing windowed plugin child widgets from the view
Summary: [GTK] Crash in debug build with removing windowed plugin child widgets from t...
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
Keywords: Gtk
Depends on:
Reported: 2014-04-28 03:37 PDT by Carlos Garcia Campos
Modified: 2014-04-28 04:11 PDT (History)
6 users (show)

See Also:

Patch (2.45 KB, patch)
2014-04-28 03:40 PDT, Carlos Garcia Campos
no flags Details | Formatted Diff | Diff
Fix coding style (2.46 KB, patch)
2014-04-28 03:46 PDT, Carlos Garcia Campos
pnormand: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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]
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>