[Webkit-unassigned] [Bug 26517] New: webkit_web_back_forward_list_add_item() should add a ref for the history item

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jun 18 14:35:15 PDT 2009


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

           Summary: webkit_web_back_forward_list_add_item() should add a ref
                    for the history item
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: PC
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: WebKit Gtk
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: oliver.gerlich at gmx.de


When using the pywebkitgtk bindings to manually add a WebKitWebHistoryItem to a
back-forward-list using WebKitWebBackForwardList.add_item(), the caller
currently has to keep a reference to the item because otherwise the item is
destroyed. Example:

for uri in ["http://example.com/1/", "http://example.com/2/"]:
    item = WebHistoryItem(uri, "")
    bf_list.add_item(item)
backList = bf_list.get_back_list_with_limit(10)

This leads to a crash in the last line. Keeping the created WebHistoryItems
referenced in Python (eg. by putting them into a global list) works around the
problem. From what I understand, to fix this, add_item should add a reference
to the item itself, so that the caller doesn't have to manually keep a
reference.

This happens with webkit-gtk 1.1.9 and pywebkitgtk 1.1.5 and Python 2.6.2, on
Ubuntu Jaunty (9.04).


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



More information about the webkit-unassigned mailing list