Changeset 167883 in webkit
- Timestamp:
- Apr 28, 2014 4:10:31 AM (10 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r167873 r167883 1 2014-04-28 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 [GTK] Crash in debug build with removing windowed plugin child widgets from the view 4 https://bugs.webkit.org/show_bug.cgi?id=132252 5 6 Reviewed by Philippe Normand. 7 8 It crashes due to an assert in HashTable that checks the iterators 9 validity. The problem is that we are iterating the children map 10 and the callback called on every iteration might modify the map, 11 making the iterators invalid. This happens when the WebView is 12 destroyed, GtkContainer calls gtk_container_foreach() with 13 gtk_widget_destroy as callback. When a widget inside a container 14 is destroyed, it's removed from the container, and in our case, 15 the child widget is removed from the map. This fixes several 16 crashes when running layout tests in debug bot. 17 18 * UIProcess/API/gtk/WebKitWebViewBase.cpp: 19 (webkitWebViewBaseContainerForall): Use copyKeysToVector() instead 20 of using a range iterator for the map keys and check in every 21 iteration that the child widget from the keys vector is still 22 present in the map before calling the callback. 23 1 24 2014-04-28 Carlos Garcia Campos <cgarcia@igalia.com> 2 25 -
trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp
r167195 r167883 364 364 WebKitWebViewBasePrivate* priv = webView->priv; 365 365 366 for (const auto& widget : priv->children.keys()) 367 (*callback)(widget, callbackData); 366 Vector<GtkWidget*> children; 367 copyKeysToVector(priv->children, children); 368 for (const auto& child : children) { 369 if (priv->children.contains(child)) 370 (*callback)(child, callbackData); 371 } 368 372 369 373 if (includeInternals && priv->inspectorView)
Note: See TracChangeset
for help on using the changeset viewer.