2009-05-27 Xan Lopez <xlopez@igalia.com>
authorxan@webkit.org <xan@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 28 May 2009 14:52:53 +0000 (14:52 +0000)
committerxan@webkit.org <xan@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 28 May 2009 14:52:53 +0000 (14:52 +0000)
commita57ff932f1a7a635f1cca5a08a3d86a1b5b06e35
tree47030b937f4cbe59eb12cf135bda954211dc50d5
parentacf59e3a6e05ace7296af1d34d8b09fe3b15714f
2009-05-27  Xan Lopez  <xlopez@igalia.com>

        Reviewed by Gustavo Noronha.

        https://bugs.webkit.org/show_bug.cgi?id=26039
        [GTK] WebKitWebHistoryItem lifetime fixes

        Modify the management of history items by the BackForward list.

        Having the objects add themselves to a hash table with an extra
        reference made impossible for the cleanup code in the dispose
        method to be ever called in normal conditions, since dispose is
        called before getting rid of the last reference, which the objects
        were making to themselves. Get rid of this extra reference and
        move the responsibility of the cleanup to the BackForward list
        itself, which effectively owns the WebKitWebHistoryItems now.

        Also, update the tests to reflect this change.

        * tests/testwebbackforwardlist.c:
        (test_webkit_web_history_item_lifetime):
        (test_webkit_web_back_forward_list_order):
        (test_webkit_web_back_forward_list_add_item):
        * tests/testwebhistoryitem.c:
        (web_history_item_fixture_setup):
        (web_history_item_fixture_teardown):
        * webkit/webkitprivate.h:
        * webkit/webkitwebbackforwardlist.cpp:
        (webkit_web_back_forward_list_dispose):
        (webkit_web_back_forward_list_class_init):
        * webkit/webkitwebhistoryitem.cpp:
        (webkit_history_items):
        (webkit_history_item_add):
        (webkit_web_history_item_dispose):
        (WebKit::kit):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@44228 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebKit/gtk/ChangeLog
WebKit/gtk/tests/testwebbackforwardlist.c
WebKit/gtk/tests/testwebhistoryitem.c
WebKit/gtk/webkit/webkitprivate.h
WebKit/gtk/webkit/webkitwebbackforwardlist.cpp
WebKit/gtk/webkit/webkitwebhistoryitem.cpp