[webkit-reviews] review requested: [Bug 69343] [GTK] Initial implementation of back forward list for WebKit2 GTK+ API : [Attachment 111588] New patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Oct 19 04:05:40 PDT 2011


Carlos Garcia Campos <cgarcia at igalia.com> has asked  for review:
Bug 69343: [GTK] Initial implementation of back forward list for WebKit2 GTK+
API
https://bugs.webkit.org/show_bug.cgi?id=69343

Attachment 111588: New patch
https://bugs.webkit.org/attachment.cgi?id=111588&action=review

------- Additional Comments from Carlos Garcia Campos <cgarcia at igalia.com>
This new patch fixes the problem of list items not being freed. Now list items
have a floating reference when they are created and the global cache doesn't
keep any reference to the items. Every bf list holds a reference to all of
their items, so that when a bf list creates a new item, it consumes the
floating reference, and all other bf lists that get this item from the global
cache will increase the reference counter. This way an item will be valid as
long as it belongs to a bf list. When an item is removed from all bf lists it,
its reference counter is 0 and the object is deleted. When an item is deleted
it's removed from the global cache.

I've added a changed signal to bf list that is emitted when the list changes
(current item is updated, an item is added or one or more items are removed).
It allow us to delete objects from our cache, and users will be notified that
those items have been removed. 

To make sure items are not leaked I've added a way to watch objects in unit
tests. Test class contains a HashSet of objects that are added manually, and
removed from the HashSet when the object is finalized. In the class destructor
the HashSet should be empty if all watched objects have been deleted. 

I detected a circular dependency between WebView and WebLoaderClient that made
the view not being released. I've fixed it to make unit tests pass, but it
won't be needed when bug #69358 is fixed.


More information about the webkit-reviews mailing list