This happens when doing a normal load after restoring the back forward list form session state and the list contained forward items. In that case the forward items are removed from the list and we try to reference a WebBackForwardListItem wrapper that hasn't been created. We create the wrappers on demand, and when the back forward list is populated form session state, items are added to the list without creating their wrappers. That was not possible before, and that's why we assumed that any item that is removed from the list should have a wrapper already created. I wrote a new test case for this: /webkit2/WebKitWebView/navigation-after-session-restore: (bin/TestWebKitAPI/WebKit2Gtk/TestBackForwardList:31773): GLib-GObject-CRITICAL **: g_object_ref: assertion 'G_IS_OBJECT (object)' failed
Created attachment 269266 [details] Patch
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Comment on attachment 269266 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=269266&action=review > Source/WebKit2/ChangeLog:9 > + forward list form session state and the list contained forward form -> from > Source/WebKit2/ChangeLog:13 > + the back forward list is populated form session state, items are form -> from > Source/WebKit2/ChangeLog:16 > + removed from the list should have a wrapper already created. Good job! :p > Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestBackForwardList.cpp:378 > + // forward items doesn't produce any runtime critical warning. See bug # See bug #153233. > Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestBackForwardList.cpp:395 > + // A normal load after a session restore should remove the forward list, add the new item and updated the current one. updated -> update
(In reply to comment #3) > Comment on attachment 269266 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=269266&action=review Thanks for the review. > > Source/WebKit2/ChangeLog:9 > > + forward list form session state and the list contained forward > > form -> from > > > Source/WebKit2/ChangeLog:13 > > + the back forward list is populated form session state, items are > > form -> from > > > Source/WebKit2/ChangeLog:16 > > + removed from the list should have a wrapper already created. > > Good job! :p :-D It's seems I don't know how to type from. > > Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestBackForwardList.cpp:378 > > + // forward items doesn't produce any runtime critical warning. See bug # > > See bug #153233. I had already changed this, but forgot to save the files changes :-P > > Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestBackForwardList.cpp:395 > > + // A normal load after a session restore should remove the forward list, add the new item and updated the current one. > > updated -> update Thanks!
Committed r195288: <http://trac.webkit.org/changeset/195288>