<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [GTK] Runtime critical warnings when loading a URL after a session restore"
   href="https://bugs.webkit.org/show_bug.cgi?id=153233">153233</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[GTK] Runtime critical warnings when loading a URL after a session restore
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>WebKit
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>WebKit Local Build
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Keywords</th>
          <td>Gtk
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>Normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P2
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>WebKit Gtk
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>webkit-unassigned&#64;lists.webkit.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>cgarcia&#64;igalia.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>bugs-noreply&#64;webkitgtk.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>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</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>