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).
Created attachment 31581 [details] ref the newly created items so the caller can take ownership of the item
Created attachment 31596 [details] updated patch Add a ref when adding the item in the back forward list per kov and xan's feedback in IRC.
Comment on attachment 31596 [details] updated patch Please update the docs also, r=me.
(In reply to comment #3) > (From update of attachment 31596 [details] [review]) > Please update the docs also, r=me. > Landed in r44903