<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>36464</bug_id>
          
          <creation_ts>2010-03-22 15:43:18 -0700</creation_ts>
          <short_desc>HistoryConroller::m_currentItem can sometimes be null for a fully loaded frame</short_desc>
          <delta_ts>2023-10-03 10:50:49 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>History</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>252944</dup_id>
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=252944</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>38840</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Darin Fisher (:fishd, Google)">fishd</reporter>
          <assigned_to name="Darin Fisher (:fishd, Google)">fishd</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>beidson</cc>
    
    <cc>jedrzej.nowacki</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>202806</commentid>
    <comment_count>0</comment_count>
    <who name="Darin Fisher (:fishd, Google)">fishd</who>
    <bug_when>2010-03-22 15:43:18 -0700</bug_when>
    <thetext>HistoryConroller::m_currentItem can sometimes be null for a fully loaded frame

This should not be possible, and it causes the following problems:

1) Unable to save form and scrollbar state
2) Unable to support history.replaceState method

I&apos;ll attach a test case that shows at least one way for m_currentItem to be null.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>202809</commentid>
    <comment_count>1</comment_count>
      <attachid>51365</attachid>
    <who name="Darin Fisher (:fishd, Google)">fishd</who>
    <bug_when>2010-03-22 15:46:26 -0700</bug_when>
    <thetext>Created attachment 51365
testcase</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>223849</commentid>
    <comment_count>2</comment_count>
    <who name="Jędrzej Nowacki">jedrzej.nowacki</who>
    <bug_when>2010-05-11 03:23:02 -0700</bug_when>
    <thetext>Another testcase looks like that (Qt, C++ code):

QWebPage page;
page.mainFrame-&gt;setHtml(&quot;...&quot;);

Documentation of the QWebFrane::setHtml contains a note: &quot;This method will not affect session or global history for the frame&quot;. As the setHtml doesn&apos;t affect a history it is really easy to assert/crash on a history opertions (for example pushState). It seems that we can&apos;t assume that m_currentItem or m_previousItem are always set after frame got loaded.

I&apos;m linking the bug to 38840.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1982148</commentid>
    <comment_count>3</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2023-10-03 10:50:49 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 252944 ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>51365</attachid>
            <date>2010-03-22 15:46:26 -0700</date>
            <delta_ts>2010-03-22 15:46:26 -0700</delta_ts>
            <desc>testcase</desc>
            <filename>test_bwo36464_reduced.html</filename>
            <type>text/html</type>
            <size>395</size>
            <attacher name="Darin Fisher (:fishd, Google)">fishd</attacher>
            
              <data encoding="base64">PHNjcmlwdD4KaWYgKHBhcmVudCA9PSB3aW5kb3cpIHsKICBmdW5jdGlvbiByZXBsYWNlSGFzaChm
cmFnKSB7CiAgICBmcmFtZXNbMF0ubG9jYXRpb24ucmVwbGFjZSgnIycgKyBmcmFnKTsKICB9CiAg
b25sb2FkID0gZnVuY3Rpb24oKSB7CiAgICB2YXIgZiA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQo
J2lmcmFtZScpOwogICAgZi5zcmMgPSBsb2NhdGlvbjsKICAgIGYub25sb2FkID0gZnVuY3Rpb24o
KSB7CiAgICAgIGRlbGV0ZSBmLm9ubG9hZDsKICAgICAgZnJhbWVzWzBdLmhpc3RvcnkucmVwbGFj
ZVN0YXRlKCdiYXInLCAnYmFyJywgJyNiYXInKTsKICAgIH0KICAgIGRvY3VtZW50LmJvZHkuYXBw
ZW5kQ2hpbGQoZik7CiAgICByZXBsYWNlSGFzaCgnZm9vJyk7CiAgfQp9Cjwvc2NyaXB0Pgo=
</data>

          </attachment>
      

    </bug>

</bugzilla>