Title: [122567] trunk/Source/WebKit2
- Revision
- 122567
- Author
- [email protected]
- Date
- 2012-07-13 05:08:00 -0700 (Fri, 13 Jul 2012)
Log Message
[GTK] WebKit2 crash when going back/forward
https://bugs.webkit.org/show_bug.cgi?id=91220
Reviewed by Xan Lopez.
For some reason when a page is loaded from the backforward list,
when the didCommitLoadForFrame callback is called for the main
frame, the callback didInitiateLoadForResource hasn't been called
yet, so we don't even have a main resource at that point. We were
assuming we always had a main resource with a response. For now we
just check whether we have a resource before trying to set the
certificate to fix the crash, but we need to figue out why this is
happening an how to properly fix it.
* UIProcess/API/gtk/WebKitLoaderClient.cpp:
(didCommitLoadForFrame): Check whether we have a main resource
before setting the certificate.
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (122566 => 122567)
--- trunk/Source/WebKit2/ChangeLog 2012-07-13 12:03:40 UTC (rev 122566)
+++ trunk/Source/WebKit2/ChangeLog 2012-07-13 12:08:00 UTC (rev 122567)
@@ -1,3 +1,23 @@
+2012-07-13 Carlos Garcia Campos <[email protected]>
+
+ [GTK] WebKit2 crash when going back/forward
+ https://bugs.webkit.org/show_bug.cgi?id=91220
+
+ Reviewed by Xan Lopez.
+
+ For some reason when a page is loaded from the backforward list,
+ when the didCommitLoadForFrame callback is called for the main
+ frame, the callback didInitiateLoadForResource hasn't been called
+ yet, so we don't even have a main resource at that point. We were
+ assuming we always had a main resource with a response. For now we
+ just check whether we have a resource before trying to set the
+ certificate to fix the crash, but we need to figue out why this is
+ happening an how to properly fix it.
+
+ * UIProcess/API/gtk/WebKitLoaderClient.cpp:
+ (didCommitLoadForFrame): Check whether we have a main resource
+ before setting the certificate.
+
2012-07-13 Christophe Dumez <[email protected]>
[EFL][WK2] Use eina stringsharing for Ewk_Web_Resource's url
Modified: trunk/Source/WebKit2/UIProcess/API/gtk/WebKitLoaderClient.cpp (122566 => 122567)
--- trunk/Source/WebKit2/UIProcess/API/gtk/WebKitLoaderClient.cpp 2012-07-13 12:03:40 UTC (rev 122566)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/WebKitLoaderClient.cpp 2012-07-13 12:08:00 UTC (rev 122567)
@@ -66,8 +66,13 @@
return;
WebKitWebView* webView = WEBKIT_WEB_VIEW(clientInfo);
- WebKitURIResponse* response = webkit_web_resource_get_response(webkit_web_view_get_main_resource(webView));
- webkitURIResponseSetCertificateInfo(response, WKFrameGetCertificateInfo(frame));
+ WebKitWebResource* resource = webkit_web_view_get_main_resource(webView);
+ if (resource) {
+ // We might not have a resource if this load is a content replacement.
+ // FIXME: For some reason, when going back/forward this callback is emitted even before
+ // didInitiateLoadForResource(), so we don't have a main resource at this point either.
+ webkitURIResponseSetCertificateInfo(webkit_web_resource_get_response(resource), WKFrameGetCertificateInfo(frame));
+ }
webkitWebViewLoadChanged(webView, WEBKIT_LOAD_COMMITTED);
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes