Title: [191561] releases/WebKitGTK/webkit-2.10/Source/WebKit2
- Revision
- 191561
- Author
- [email protected]
- Date
- 2015-10-26 00:38:45 -0700 (Mon, 26 Oct 2015)
Log Message
Merge r191284 - [GTK] ASSERTION FAILED: parent in WebInspectorProxy::platformDetach()
https://bugs.webkit.org/show_bug.cgi?id=150319
Reviewed by Žan Doberšek.
This happens when the inspector is shown/closed very
quickly. Since we start the inspector attached by default, when
the web inspector is created m_isAttached is set to true, so that
when opened, it's attached to the view. If the inspector is closed
before it has been actually attached, the inspector view doesn't
have a parent, even if the m_isAttached is true. So, we should
handle this case instead of asserting. This is what happens in
test http/tests/xmlhttprequest/access-control-repeated-failed-preflight-crash.html.
* UIProcess/gtk/WebInspectorProxyGtk.cpp:
(WebKit::WebInspectorProxy::platformDetach): Remove the view from
its parent container if it was actually attached.
Modified Paths
Diff
Modified: releases/WebKitGTK/webkit-2.10/Source/WebKit2/ChangeLog (191560 => 191561)
--- releases/WebKitGTK/webkit-2.10/Source/WebKit2/ChangeLog 2015-10-26 07:37:52 UTC (rev 191560)
+++ releases/WebKitGTK/webkit-2.10/Source/WebKit2/ChangeLog 2015-10-26 07:38:45 UTC (rev 191561)
@@ -1,3 +1,23 @@
+2015-10-19 Carlos Garcia Campos <[email protected]>
+
+ [GTK] ASSERTION FAILED: parent in WebInspectorProxy::platformDetach()
+ https://bugs.webkit.org/show_bug.cgi?id=150319
+
+ Reviewed by Žan Doberšek.
+
+ This happens when the inspector is shown/closed very
+ quickly. Since we start the inspector attached by default, when
+ the web inspector is created m_isAttached is set to true, so that
+ when opened, it's attached to the view. If the inspector is closed
+ before it has been actually attached, the inspector view doesn't
+ have a parent, even if the m_isAttached is true. So, we should
+ handle this case instead of asserting. This is what happens in
+ test http/tests/xmlhttprequest/access-control-repeated-failed-preflight-crash.html.
+
+ * UIProcess/gtk/WebInspectorProxyGtk.cpp:
+ (WebKit::WebInspectorProxy::platformDetach): Remove the view from
+ its parent container if it was actually attached.
+
2015-10-18 Joonghun Park <[email protected]>
[GTK] Remove WebKitContextMenu related missing annotation warnings
Modified: releases/WebKitGTK/webkit-2.10/Source/WebKit2/UIProcess/gtk/WebInspectorProxyGtk.cpp (191560 => 191561)
--- releases/WebKitGTK/webkit-2.10/Source/WebKit2/UIProcess/gtk/WebInspectorProxyGtk.cpp 2015-10-26 07:37:52 UTC (rev 191560)
+++ releases/WebKitGTK/webkit-2.10/Source/WebKit2/UIProcess/gtk/WebInspectorProxyGtk.cpp 2015-10-26 07:38:45 UTC (rev 191561)
@@ -306,9 +306,11 @@
GRefPtr<GtkWidget> inspectorView = m_inspectorView;
if (!m_client.detach(this)) {
- GtkWidget* parent = gtk_widget_get_parent(m_inspectorView);
- ASSERT(parent);
- gtk_container_remove(GTK_CONTAINER(parent), m_inspectorView);
+ // Detach is called when m_isAttached is true, but it could called before
+ // the inspector is opened if the inspector is shown/closed quickly. So,
+ // we might not have a parent yet.
+ if (GtkWidget* parent = gtk_widget_get_parent(m_inspectorView))
+ gtk_container_remove(GTK_CONTAINER(parent), m_inspectorView);
}
if (!m_isVisible)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes