Bug 118352

Summary: [WK2][GTK] Invalid ASSERTs in WebResources loading code
Product: WebKit Reporter: Sergio Villar Senin <svillar>
Component: WebKitGTKAssignee: Sergio Villar Senin <svillar>
Status: RESOLVED FIXED    
Severity: Normal CC: cgarcia, commit-queue, gustavo, mrobinson, svillar
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch cgarcia: review+

Description Sergio Villar Senin 2013-07-03 04:19:10 PDT
The WebKitWebView keeps track of the resources being loaded in a map that is cleared each time a new load starts. As it's using the injected bundle API to track resource loads it might happen (specially when running webkit under valgrind) that we get notifications for resources that correspond to previous page loads.

We need to remove those ASSERTs as they're no longer correct.
Comment 1 Sergio Villar Senin 2013-07-03 04:37:58 PDT
Created attachment 205992 [details]
Patch
Comment 2 WebKit Commit Bot 2013-07-03 04:39:14 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 Carlos Garcia Campos 2013-07-03 05:00:49 PDT
Comment on attachment 205992 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=205992&action=review

You are absolutely right, but I'm not sure about the second assert. Thanks!

> Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp:-1632
> -    ASSERT(priv->loadingResourcesMap.contains(resourceIdentifier));

I'm not sure about this one, this method is always called after webkitWebViewGetLoadingWebResource() only when we have a valid pointer.
Comment 4 Sergio Villar Senin 2013-07-03 07:53:02 PDT
Committed r152354: <http://trac.webkit.org/changeset/152354>