Bug 153233

Summary: [GTK] Runtime critical warnings when loading a URL after a session restore
Product: WebKit Reporter: Carlos Garcia Campos <cgarcia>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: berto, bugs-noreply, commit-queue, gustavo, mcatanzaro, mrobinson
Priority: P2 Keywords: Gtk
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch mcatanzaro: review+

Carlos Garcia Campos
Reported 2016-01-19 06:48:34 PST
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
Attachments
Patch (6.25 KB, patch)
2016-01-19 06:51 PST, Carlos Garcia Campos
mcatanzaro: review+
Carlos Garcia Campos
Comment 1 2016-01-19 06:51:16 PST
WebKit Commit Bot
Comment 2 2016-01-19 06:52:58 PST
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
Michael Catanzaro
Comment 3 2016-01-19 06:58:20 PST
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
Carlos Garcia Campos
Comment 4 2016-01-19 08:48:28 PST
(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!
Carlos Garcia Campos
Comment 5 2016-01-19 08:50:18 PST
Note You need to log in before you can comment on or make changes to this bug.