[Webkit-unassigned] [Bug 108960] [GTK] Remove subresource leaks from WebKit1 and WebKit2

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Feb 11 09:00:45 PST 2013


https://bugs.webkit.org/show_bug.cgi?id=108960





--- Comment #17 from Carlos Garcia Campos <cgarcia at igalia.com>  2013-02-11 09:02:57 PST ---
(In reply to comment #15)
> (In reply to comment #13)
> 
> > Resources are not identified by the URI, but by their numeric identifier. Every time a resource is loaded a new identifier is assigned, even if the URI is the 
> same, so it will always be a new resource.
> 
> The call in webkit_web_resource_get_data seems to be passing the URL:
> 
>     if (resource->priv->isMainResource)
>         resource->priv->frame->getMainResourceData(DataCallback::create(result, resourceDataCallback));
>     else {
>         String url = String::fromUTF8(resource->priv->uri.data());
>         resource->priv->frame->getResourceData(WebURL::create(url).get(), DataCallback::create(result, resourceDataCallback));
>     }

Right, the identifier is only used for loading resources, while loaded we are using the URI. In that case, maybe we could just check when moving the resources from loading map to subresources map, and remove any existing subresource for the same URI. That would fix the problem without changing the API.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list