<?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>50331</bug_id>
          
          <creation_ts>2010-12-01 09:55:16 -0800</creation_ts>
          <short_desc>ASSERT failing restoring scroll position from HistoryItem after reload</short_desc>
          <delta_ts>2023-10-03 10:50:37 -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>Page Loading</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</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>
          
          <blocked>57906</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Mario Sanchez Prada">mario</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>abarth</cc>
    
    <cc>ahmad.saleem792</cc>
    
    <cc>beidson</cc>
    
    <cc>creis</cc>
    
    <cc>darin</cc>
    
    <cc>eric</cc>
    
    <cc>fishd</cc>
    
    <cc>jdiggs</cc>
    
    <cc>mike</cc>
    
    <cc>mrobinson</cc>
    
    <cc>ostroffjh</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>315704</commentid>
    <comment_count>0</comment_count>
    <who name="Mario Sanchez Prada">mario</who>
    <bug_when>2010-12-01 09:55:16 -0800</bug_when>
    <thetext>As unveiled by a new unit test in patch for bug 25831 (currently rolled out), there&apos;s a situation where the following ASSERT in HistoryController is failing, causing crashes in GTK&apos;s debug builds:

    void HistoryController::restoreScrollPositionAndViewState()
    {
        if (!m_frame-&gt;loader()-&gt;stateMachine()-&gt;committedFirstRealDocumentLoad())
            return;

        ASSERT(m_currentItem);
        [...]
    }

After some investigation it seems that, in the specific scenario caused by bug 25831&apos;s patch, the HistoryController is never, ever, updated with a valid &apos;currentItem&apos;, causing this failure when trying to call this function, while finishing the reload of the webview. So, the question is &quot;how could it be possible that we reached this situation?&quot;, and I think I found the answer...

The situation that triggers this problem is the following code in WebKit/gtk/tests/testatk.c (where &apos;contents&apos; is a const char* with a hardcoded html code):

    static void testWebkitAtkDocumentReloadEvents()
    {
        WebKitWebView* webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
        [...]
        webkit_web_view_load_string(webView, contents, 0, 0, 0);
        [...]
    }

As you can see, that code just loads the HTML in the &apos;contents&apos; variable in the webview. Then, when trying to test the actual issue fixed with that patch, we do:

       webkit_web_view_reload(webView);

... and that&apos;s what&apos;s causing the problem, resulting in the following error output:

   ASSERTION FAILED: m_currentItem
   (../../WebCore/loader/HistoryController.cpp:103 void WebCore::HistoryController::restoreScrollPositionAndViewState())


After investigating the issue for a long time, diving through a long backtrace, I found the problem seems to be that it&apos;s ok not to have a valid m_currentItem in the HistoryController for this case, since the webView is being loaded from a raw char* with the HTML code, instead of fetching the HTML content from a URI (as it would be done with webkit_web_view_load_uri(), in WebKitGTK), hence there&apos;s no valid HistoryItem to be stored (no URI!), resulting in the problem explained above.

Hence I think the problem could be solved by either removing that ASSERT from HistoryController::restoreScrollPositionAndViewState(), accepting that there are still situations (like this one) where m_currentItem could be 0, or just to try to protect the calls to that function from the callers when needed. So far, I found that the only place that would require such that extra check would be the following one:

    void FrameLoader::checkLoadCompleteForThisFrame()
    {
        [...]
        switch (m_state) {
                [...]
            case FrameStateCommittedPage: {
                [...]
                // If the user had a scroll point, scroll to it, overriding the anchor point if any.
                if (m_frame-&gt;page()) {
                    if (isBackForwardLoadType(m_loadType) || m_loadType == FrameLoadTypeReload || m_loadType == FrameLoadTypeReloadFromOrigin)
                        history()-&gt;restoreScrollPositionAndViewState();
                }
                [...]
        }
        [...]
    }

I think we could protect this scenario by just doing something like this:

   // If the user had a scroll point, scroll to it, overriding the anchor point if any.
   if (m_frame-&gt;page() &amp;&amp; history()-&gt;currentItem()) {
       if (isBackForwardLoadType(m_loadType) || m_loadType == FrameLoadTypeReload || m_loadType == FrameLoadTypeReloadFromOrigin)
           history()-&gt;restoreScrollPositionAndViewState();
   }


I tested this solution and avoids the crash in my debug build of WebKitGTK, while still passing all the tests, but still not sure whether that&apos;s the right solution, if it would be better just to remove the ASSERT in HistoryController::restoreScrollPositionAndViewState() or if I&apos;m missing something else, in which case I&apos;d appreaciate any kind of feedback :-)

Sorry for the long report, hope at least you&apos;ll find this info valuable.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>315717</commentid>
    <comment_count>1</comment_count>
      <attachid>75287</attachid>
    <who name="Mario Sanchez Prada">mario</who>
    <bug_when>2010-12-01 10:22:01 -0800</bug_when>
    <thetext>Created attachment 75287
Patch proposal

Attaching patch based on the comments pointed out in the description</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>315721</commentid>
    <comment_count>2</comment_count>
    <who name="Mario Sanchez Prada">mario</who>
    <bug_when>2010-12-01 10:24:59 -0800</bug_when>
    <thetext>Adding to CC people found through svn blame</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>316879</commentid>
    <comment_count>3</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2010-12-03 10:29:29 -0800</bug_when>
    <thetext>Btw, webkit-patch upload --suggest-reviewers will do the svn blame step for you automatically and then offer to CC relevant reviewers.  It&apos;s certainly not perfect, but it&apos;s often good enough.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>316880</commentid>
    <comment_count>4</comment_count>
      <attachid>75287</attachid>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2010-12-03 10:30:27 -0800</bug_when>
    <thetext>Comment on attachment 75287
Patch proposal

View in context: https://bugs.webkit.org/attachment.cgi?id=75287&amp;action=review

This needs a test.

&gt; WebCore/loader/FrameLoader.cpp:2408
&gt; +            // If the user had a scroll point, scroll to it,
&gt; +            // overriding the anchor point if any. Also, make sure
&gt; +            // there&apos;s a valid current item in the history before
&gt; +            // trying to scroll because it could happen there was none
&gt; +            // (e.g. loading from a string instead of an URI).
&gt; +            if (m_frame-&gt;page() &amp;&amp; history()-&gt;currentItem()) {

Seems rather overzealous line wrapping. :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>317560</commentid>
    <comment_count>5</comment_count>
    <who name="Mario Sanchez Prada">mario</who>
    <bug_when>2010-12-06 04:45:45 -0800</bug_when>
    <thetext>Thanks for the review Eric, but I have some doubts that are currently blocking me from providing a better patch. See below...

(In reply to comment #4)
&gt; (From update of attachment 75287 [details])
&gt; View in context: https://bugs.webkit.org/attachment.cgi?id=75287&amp;action=review
&gt; 
&gt; This needs a test.

Not sure whether you mean a Layout Test (this is my guessing, though) or an unit test.

The problem with writing a Layout Test for this is that, as I said, the bug happens when  using webkit_web_view_load_string() in an unit test for the GTK port, which basically loads an HTML content from a (const gchar*) instead of loading the content from an URI. And that is (not having an URI) precisely the problem causing this bug, since history-&gt;currentItem() will be 0 at the point we&apos;re trying to restore the scroll position, right after finishing the reload process.

Hence, I don&apos;t know how to test this with a layout test, since (1) a layout test has always an URI (the path to the test), so it wouldn&apos;t be testing the problem I try to fix, and (2) since the problem was detected from a function of the GTK port.


In case you&apos;re talking about an unit test (or perhaps you were not, but my paragraphs above has finally convinced you :-)), I do not see any problem on writing an small unit test in the GTK port for that, which would be a ultra-reduced version of testWebkitAtkDocumentReloadEvents() (provided with patch for bug 25831), in case that was fine.

So, as you can see, I need some extra input here to continue working on this :-)

&gt; &gt; WebCore/loader/FrameLoader.cpp:2408
&gt; &gt; +            // If the user had a scroll point, scroll to it,
&gt; &gt; +            // overriding the anchor point if any. Also, make sure
&gt; &gt; +            // there&apos;s a valid current item in the history before
&gt; &gt; +            // trying to scroll because it could happen there was none
&gt; &gt; +            // (e.g. loading from a string instead of an URI).
&gt; &gt; +            if (m_frame-&gt;page() &amp;&amp; history()-&gt;currentItem()) {
&gt; 
&gt; Seems rather overzealous line wrapping. :)

I don&apos;t think I deserve credit for this: emacs was the author of such a beautiful piece of art!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>317663</commentid>
    <comment_count>6</comment_count>
      <attachid>75704</attachid>
    <who name="Mario Sanchez Prada">mario</who>
    <bug_when>2010-12-06 09:20:28 -0800</bug_when>
    <thetext>Created attachment 75704
Patch proposal + unit test

Attaching a new patch with a new unit test to check everything works as expected when reloading a webView loaded through a gchar*. The unit test is GTK specific, so I guess it&apos;s not the perfect solution, but the best one I could find so far since I wasn&apos;t able to write a layout test to test this stuff.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>320776</commentid>
    <comment_count>7</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2010-12-12 02:27:51 -0800</bug_when>
    <thetext>CC&apos;d folks who know more than I do about history.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>320987</commentid>
    <comment_count>8</comment_count>
    <who name="Mario Sanchez Prada">mario</who>
    <bug_when>2010-12-13 01:41:39 -0800</bug_when>
    <thetext>(In reply to comment #7)
&gt; CC&apos;d folks who know more than I do about history.

Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>327123</commentid>
    <comment_count>9</comment_count>
    <who name="Martin Robinson">mrobinson</who>
    <bug_when>2010-12-27 14:44:33 -0800</bug_when>
    <thetext>This test changes platform-independent WebCore code. Is it possible to write a layout test for all platforms?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>327776</commentid>
    <comment_count>10</comment_count>
      <attachid>75704</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2010-12-29 18:01:04 -0800</bug_when>
    <thetext>Comment on attachment 75704
Patch proposal + unit test

View in context: https://bugs.webkit.org/attachment.cgi?id=75704&amp;action=review

Thanks for tackling this.

&gt; WebCore/loader/FrameLoader.cpp:2410
&gt; +            // If the user had a scroll point, scroll to it, overriding the anchor
&gt; +            // point if any. Also, make sure there&apos;s a valid current item in the
&gt; +            // history before trying to scroll because it could happen there was
&gt; +            // none (e.g. loading from a string instead of an URI).
&gt; +            if (m_frame-&gt;page() &amp;&amp; history()-&gt;currentItem()) {
&gt;                  if (isBackForwardLoadType(m_loadType) || m_loadType == FrameLoadTypeReload || m_loadType == FrameLoadTypeReloadFromOrigin)
&gt;                      history()-&gt;restoreScrollPositionAndViewState();
&gt;              }

It’s pretty clear looking at this code that the currentItem check belongs inside the restoreScrollPositionAndViewState function, not here at the call site.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>328498</commentid>
    <comment_count>11</comment_count>
    <who name="Mario Sanchez Prada">mario</who>
    <bug_when>2011-01-03 02:10:22 -0800</bug_when>
    <thetext>(In reply to comment #9)
&gt; This test changes platform-independent WebCore code. Is it possible to write a layout test for all platforms?

A I said in comment #6, I wouldn&apos;t know how to write a layout test to test this stuff, that&apos;s why I&apos;m proposing a GTK-specific unit test instead. 

On the bright side, it seems this problem affects only to the GTK port, so perhaps it&apos;s not a terrible solution either, but you&apos;ll have the final word, of course :-)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>328562</commentid>
    <comment_count>12</comment_count>
    <who name="Mario Sanchez Prada">mario</who>
    <bug_when>2011-01-03 07:27:45 -0800</bug_when>
    <thetext>Oops! forgot to reply this other comment...

(In reply to comment #10)
&gt; (From update of attachment 75704 [details])
&gt; View in context: https://bugs.webkit.org/attachment.cgi?id=75704&amp;action=review
&gt; 
&gt; Thanks for tackling this.
&gt; 
&gt; &gt; WebCore/loader/FrameLoader.cpp:2410
&gt; &gt; +            // If the user had a scroll point, scroll to it, overriding the anchor
&gt; &gt; +            // point if any. Also, make sure there&apos;s a valid current item in the
&gt; &gt; +            // history before trying to scroll because it could happen there was
&gt; &gt; +            // none (e.g. loading from a string instead of an URI).
&gt; &gt; +            if (m_frame-&gt;page() &amp;&amp; history()-&gt;currentItem()) {
&gt; &gt;                  if (isBackForwardLoadType(m_loadType) || m_loadType == FrameLoadTypeReload || m_loadType == FrameLoadTypeReloadFromOrigin)
&gt; &gt;                      history()-&gt;restoreScrollPositionAndViewState();
&gt; &gt;              }
&gt; 
&gt; It’s pretty clear looking at this code that the currentItem check belongs inside the 
&gt; restoreScrollPositionAndViewState function, not here at the call site.

As I said in the description, I was not sure about that being the right option, although I also considered as a possibility:

&quot; [...] Hence I think the problem could be solved by either removing that ASSERT from HistoryController::restoreScrollPositionAndViewState(), accepting that there are still situations (like this one) where m_currentItem could be 0, or just to try to protect the calls to that function from the callers when needed. So far, I found that the only place that would require such that extra check would be the following one [...]&quot; 


So, I initially proposed adding the extra check in the call site in order not to remove the ASSERT in HistoryController::restoreScrollPositionAndViewState(), which I thought perhaps could be seen as the wrong thing to do. But now you commented on this I&apos;m more for adding the protection inside that function, replacing the ASSERT right there with just a null check to avoid doing anything if currentItem is null.

So, expect a new patch in some minutes...

Thanks for the feedback!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>328599</commentid>
    <comment_count>13</comment_count>
      <attachid>77812</attachid>
    <who name="Mario Sanchez Prada">mario</who>
    <bug_when>2011-01-03 09:33:35 -0800</bug_when>
    <thetext>Created attachment 77812
Patch proposal + unit test

Attaching new patch to be reviewed, this time moving the null check to HistoryController::restoreScrollPositionAndViewState(), that is, removing the ASSERT and explaining the change in a comment :P

Also, provided the unit test as in the previous patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>339310</commentid>
    <comment_count>14</comment_count>
    <who name="Joanmarie Diggs">jdiggs</who>
    <bug_when>2011-01-24 15:37:41 -0800</bug_when>
    <thetext>So the good news is that Orca+Epiphany are shaping up nicely.

The bad news is when I follow links and new pages are loaded Orca has no clue and thus presents the no-longer displayed content. :-( If this is the only thing standing in the way of committing the fix for bug 25831, please let me know what bribes are needed to get Mario&apos;s patch reviewed and they will be in the mail. :-P

(Really sorry to be a noodge. And thanks in advance guys!!)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>339552</commentid>
    <comment_count>15</comment_count>
    <who name="Mario Sanchez Prada">mario</who>
    <bug_when>2011-01-25 02:01:57 -0800</bug_when>
    <thetext>(In reply to comment #14)
&gt; So the good news is that Orca+Epiphany are shaping up nicely.

Great!

&gt; The bad news is when I follow links and new pages are loaded Orca has no clue 
&gt; and thus presents the no-longer displayed content. :-( If this is the only 
&gt; thing standing in the way of committing the fix for bug 25831,

Yes, actually this is the only pending bit blocking the (already reviewed+) patch for 25831 to be applied.

&gt; please let me 
&gt; know what bribes are needed to get Mario&apos;s patch reviewed and they will be in 
&gt; the mail. :-P

:-)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>339562</commentid>
    <comment_count>16</comment_count>
      <attachid>77812</attachid>
    <who name="Darin Fisher (:fishd, Google)">fishd</who>
    <bug_when>2011-01-25 02:53:43 -0800</bug_when>
    <thetext>Comment on attachment 77812
Patch proposal + unit test

View in context: https://bugs.webkit.org/attachment.cgi?id=77812&amp;action=review

&gt; WebCore/loader/HistoryController.cpp:-104
&gt; -    

this seems like the wrong direction to go.  you have identified a case
where we can get a null m_currentItem.  perhaps we should instead try
to fix that case to not have a null m_currentItem?

i think it needlessly complicates HistoryController to have to support
a null m_currentItem as we sort of do today.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>339579</commentid>
    <comment_count>17</comment_count>
    <who name="Mario Sanchez Prada">mario</who>
    <bug_when>2011-01-25 03:57:48 -0800</bug_when>
    <thetext>(In reply to comment #16)
&gt; (From update of attachment 77812 [details])
&gt; View in context: https://bugs.webkit.org/attachment.cgi?id=77812&amp;action=review
&gt; 
&gt; &gt; WebCore/loader/HistoryController.cpp:-104
&gt; &gt; -    
&gt; 
&gt; this seems like the wrong direction to go.  you have identified a case
&gt; where we can get a null m_currentItem.  perhaps we should instead try
&gt; to fix that case to not have a null m_currentItem?
&gt; 
&gt; i think it needlessly complicates HistoryController to have to support
&gt; a null m_currentItem as we sort of do today.

That was my first approach (to avoid getting a null m_currentItem when calling that function), but in comment #10 Darin (well, &quot;the other Darin&quot;) pointed out that it would be better to make the change right inside restoreScrollPositionAndViewState(), so I did.

Not sure what to do now, perhaps I&apos;m missing something and there&apos;s a third way to fix this, but I can&apos;t clearly see it at this moment.

Any hint?

Thanks for the feedback, btw.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>339675</commentid>
    <comment_count>18</comment_count>
    <who name="Darin Fisher (:fishd, Google)">fishd</who>
    <bug_when>2011-01-25 09:14:41 -0800</bug_when>
    <thetext>(In reply to comment #17)
&gt; &gt; this seems like the wrong direction to go.  you have identified a case
&gt; &gt; where we can get a null m_currentItem.  perhaps we should instead try
&gt; &gt; to fix that case to not have a null m_currentItem?
&gt; &gt; 
&gt; &gt; i think it needlessly complicates HistoryController to have to support
&gt; &gt; a null m_currentItem as we sort of do today.
&gt; 
&gt; That was my first approach (to avoid getting a null m_currentItem when calling that function), but in comment #10 Darin (well, &quot;the other Darin&quot;) pointed out that it would be better to make the change right inside restoreScrollPositionAndViewState(), so I did.
&gt; 
&gt; Not sure what to do now, perhaps I&apos;m missing something and there&apos;s a third way to fix this, but I can&apos;t clearly see it at this moment.

Yes, I was referring to a different approach.  Instead of null checking m_currentItem, I think it would be better to ensure that webkit_web_view_load_string actually creates a HistoryItem.  Why doesn&apos;t it create one?

webkit_web_view_load_string looks a lot like WebKit::WebFrame::loadData() in the Chromium WebKit API.  Perhaps you can compare your implementation of webkit_web_view_load_string to that to see how they compare.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>340233</commentid>
    <comment_count>19</comment_count>
    <who name="Mario Sanchez Prada">mario</who>
    <bug_when>2011-01-26 06:12:15 -0800</bug_when>
    <thetext>(In reply to comment #18)
&gt; [...] 
&gt; Yes, I was referring to a different approach.  Instead of null checking
&gt; m_currentItem, I think it would be better to ensure that 
&gt; webkit_web_view_load_string actually creates a HistoryItem. 
&gt; Why doesn&apos;t it create one?

As far as I can see from the code and while debugging, it seems the problem is that such a function ends up calling webkit_web_frame_load_data () with zero in the unreachableURL param, meaning that no history item will be created later on in HistoryController::updateForStandardLoad(), as historyURL.isEmpty() will return true there.

I could probably use webkit_web_frame_load_alternate_string() from the unit test to workaround this problem (passing a dummy unreachableURL), but I don&apos;t think it&apos;s a good approach... still think that if that was the case the last proposed patch would be a better option, since it would be gracefully treating the (very strange) case of calling to restoreScrollPosition() with m_currentItem == 0.

But take this with a grain of salt, of course. I know can be wrong again

&gt; webkit_web_view_load_string looks a lot like WebKit::WebFrame::loadData()
&gt; in the Chromium WebKit API.  Perhaps you can compare your implementation
&gt; of webkit_web_view_load_string to that to see how they compare.

I&apos;ve spent all the morning debugging the code and deeply analyzing the code behind that function (and comparing it to webkit_web_view_load_string() in the GTK port), and I can&apos;t properly understand why that function in Chromium wouldn&apos;t be affected by the same problem... actually, hope you don&apos;t mind me explicitly asking this but: are you sure the same problem doesn&apos;t happen in Chromium? To be sure, it would be wonderful if you could try to reproduce it by:

  1. Compile a debug build, so ASSERTS will make WK crash if false.
  2. Create a new WebKit view in your test code.
  3. Load an static string with HTML content on it through WebKit::WebFrame::loadData(), as you said.
  4. Try to reload now.

If I&apos;m right, you should be getting a crash as the result of the ASSERT failing in restoreScrollPositionAndViewState().

I of course understand that you could have no time to test this, but I&apos;d appreciate at least some insight on these thoughts, they could be really helpful to me.

Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>348051</commentid>
    <comment_count>20</comment_count>
    <who name="Mario Sanchez Prada">mario</who>
    <bug_when>2011-02-09 01:18:09 -0800</bug_when>
    <thetext>Ping?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>379975</commentid>
    <comment_count>21</comment_count>
    <who name="Charles Reis">creis</who>
    <bug_when>2011-04-05 17:05:33 -0700</bug_when>
    <thetext>I&apos;ve discovered a way to write a layout test for this bug:

w = window.open();
w.document.write(1);
w.location.reload();

This code is actually broken in another way (in that it loads the wrong page during reload()), but it does hit the same assert being discussed here.  I&apos;ve filed bug 57906 for the reload bug, and I&apos;ve uploaded a sample layout test there.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>392834</commentid>
    <comment_count>22</comment_count>
      <attachid>77812</attachid>
    <who name="Adam Barth">abarth</who>
    <bug_when>2011-04-26 15:35:53 -0700</bug_when>
    <thetext>Comment on attachment 77812
Patch proposal + unit test

There seems to be agreement in the comments that this ASSERT is correct and other code should be changed so that m_currentItem is always non-NULL at this program point.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>392966</commentid>
    <comment_count>23</comment_count>
    <who name="Mario Sanchez Prada">mario</who>
    <bug_when>2011-04-26 16:17:24 -0700</bug_when>
    <thetext>(In reply to comment #22)
&gt; (From update of attachment 77812 [details])
&gt; There seems to be agreement in the comments that this ASSERT is correct and 
&gt; other code should be changed so that m_currentItem is always non-NULL at this 
&gt; program point.

Then, unless I&apos;m missing something else, the right approach would be the one proposed in the second patch, right?

https://bugs.webkit.org/attachment.cgi?id=75704&amp;action=prettypatch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>514693</commentid>
    <comment_count>24</comment_count>
    <who name="Mario Sanchez Prada">mario</who>
    <bug_when>2011-12-04 08:19:24 -0800</bug_when>
    <thetext>(In reply to comment #23)
&gt; (In reply to comment #22)
&gt; &gt; (From update of attachment 77812 [details] [details])
&gt; &gt; There seems to be agreement in the comments that this ASSERT is correct and 
&gt; &gt; other code should be changed so that m_currentItem is always non-NULL at this 
&gt; &gt; program point.
&gt; 
&gt; Then, unless I&apos;m missing something else, the right approach would be the one proposed in the second patch, right?
&gt; 
&gt; https://bugs.webkit.org/attachment.cgi?id=75704&amp;action=prettypatch

Sorry about getting back to this again, but I found myself today in the very same situation while writing a new test, and it would be awesome if we could fix this (supposing it&apos;s a bug, which is not 100% clear to me at this point).

So... ping? :-)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>515261</commentid>
    <comment_count>25</comment_count>
      <attachid>77812</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2011-12-05 12:02:57 -0800</bug_when>
    <thetext>Comment on attachment 77812
Patch proposal + unit test

I still don’t understand why there is no currentItem when we are loading from a string. Fixing that seems like the way to go.

If we do agree that instead we want a null pointer check, then we have a battle of the Darins here. The question is what restoreScrollPositionAndViewState should do when there is no history. Should it assert (and then the caller has to check a pointer for null), or check and quietly do nothing when there is nothing to restore. The reason I suggest the latter is that it seems non-obvious that what the caller should null check is currentItem. Having the check inside the function makes more sense to me because it’s in there that it’s clear what to check.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>515264</commentid>
    <comment_count>26</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2011-12-05 12:04:21 -0800</bug_when>
    <thetext>The reason these patches keep getting review- is that there is no explanation of *why* current item is 0 in the “load from string” case. Once we understand why it’s 0 we can figure out if it’s a bug or not. Nobody wants to just add code to handle 0 without knowing if the 0 is legitimate or not.

The debate about whether to put the null check inside the function or outside it is a relatively unimportant sideshow to that question.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>560929</commentid>
    <comment_count>27</comment_count>
    <who name="Jack">ostroffjh</who>
    <bug_when>2012-02-21 08:56:35 -0800</bug_when>
    <thetext>I&apos;m getting the same error - but in real use, not testing.  I&apos;m using webkit-gtk with balsa (email app) under Gentoo.  I just did a debug compile of webkit-gtk 1.6.3 to track down a different problem.  I don&apos;t know if it&apos;s balsa or webkit, but when I first display an HTML email, it does not load remote images.  As soon as I click on the button to load remote images, I get this crash.

Oddly, run under gdb, it is not finding symbols for libwebktigtk, but that may be a Gentoo related issue.  I&apos;m mentioning it only in that I won&apos;t be able to provide a useful backtrace until I resolve that issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1982146</commentid>
    <comment_count>28</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2023-10-03 10:50:37 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 252944 ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>75287</attachid>
            <date>2010-12-01 10:22:01 -0800</date>
            <delta_ts>2010-12-06 09:20:28 -0800</delta_ts>
            <desc>Patch proposal</desc>
            <filename>0001-2010-12-01-Mario-Sanchez-Prada-msanchez-igalia.com.patch</filename>
            <type>text/plain</type>
            <size>2673</size>
            <attacher name="Mario Sanchez Prada">mario</attacher>
            
              <data encoding="base64">RnJvbSA3NjI0MDc5OTQ0YjdjYWJhYmM0YjE0YmExMjUxYWJlZTE3MWRiZTQzIE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBNYXJpbyBTYW5jaGV6IFByYWRhIDxtc2FuY2hlekBpZ2FsaWEu
Y29tPgpEYXRlOiBXZWQsIDEgRGVjIDIwMTAgMTk6MTk6MzggKzAxMDAKU3ViamVjdDogW1BBVENI
XSAyMDEwLTEyLTAxICBNYXJpbyBTYW5jaGV6IFByYWRhICA8bXNhbmNoZXpAaWdhbGlhLmNvbT4K
CiAgICAgICAgUmV2aWV3ZWQgYnkgTk9CT0RZIChPT1BTISkuCgogICAgICAgIEFTU0VSVCBmYWls
aW5nIHJlc3RvcmluZyBzY3JvbGwgcG9zaXRpb24gZnJvbSBIaXN0b3J5SXRlbSBhZnRlciByZWxv
YWQKICAgICAgICBodHRwczovL2J1Z3Mud2Via2l0Lm9yZy9zaG93X2J1Zy5jZ2k/aWQ9NTAzMzEK
CiAgICAgICAgRW5zdXJlIEhpc3RvcnlDb250cm9sbGVyIGNvbnRhaW5zIGEgdmFsaWQgY3VycmVu
dEl0ZW0gYmVmb3JlCiAgICAgICAgdHJ5aW5nIHRvIHJlc3RvcmUgc2Nyb2xsIHBvc2l0aW9uIGFm
dGVyIGxvYWQgY29tcGxldGlvbi4KCiAgICAgICAgKiBsb2FkZXIvRnJhbWVMb2FkZXIuY3BwOgog
ICAgICAg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KKyAgICAgICAgICAgIC8vIHRoZXJlJ3MgYSB2YWxpZCBjdXJyZW50IGl0ZW0gaW4gdGhlIGhp
c3RvcnkgYmVmb3JlCisgICAgICAgICAgICAvLyB0cnlpbmcgdG8gc2Nyb2xsIGJlY2F1c2UgaXQg
Y291bGQgaGFwcGVuIHRoZXJlIHdhcyBub25lCisgICAgICAgICAgICAvLyAoZS5nLiBsb2FkaW5n
IGZyb20gYSBzdHJpbmcgaW5zdGVhZCBvZiBhbiBVUkkpLgorICAgICAgICAgICAgaWYgKG1fZnJh
bWUtPnBhZ2UoKSAmJiBoaXN0b3J5KCktPmN1cnJlbnRJdGVtKCkpIHsKICAgICAgICAgICAgICAg
ICBpZiAoaXNCYWNrRm9yd2FyZExvYWRUeXBlKG1fbG9hZFR5cGUpIHx8IG1fbG9hZFR5cGUgPT0g
RnJhbWVMb2FkVHlwZVJlbG9hZCB8fCBtX2xvYWRUeXBlID09IEZyYW1lTG9hZFR5cGVSZWxvYWRG
cm9tT3JpZ2luKQogICAgICAgICAgICAgICAgICAgICBoaXN0b3J5KCktPnJlc3RvcmVTY3JvbGxQ
b3NpdGlvbkFuZFZpZXdTdGF0ZSgpOwogICAgICAgICAgICAgfQotLSAKMS43LjMuMgoK
</data>
<flag name="review"
          id="66072"
          type_id="1"
          status="-"
          setter="eric"
    />
          </attachment>
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>75704</attachid>
            <date>2010-12-06 09:20:28 -0800</date>
            <delta_ts>2011-01-03 09:33:35 -0800</delta_ts>
            <desc>Patch proposal + unit test</desc>
            <filename>0001-2010-12-06-Mario-Sanchez-Prada-msanchez-igalia.com.patch</filename>
            <type>text/plain</type>
            <size>7151</size>
            <attacher name="Mario Sanchez Prada">mario</attacher>
            
              <data encoding="base64">RnJvbSA1YWYzNjczYzI1MzUxOGRjNDI5MzQ1ZDg5ZGQ3ZWJlYjJiODQxNzk3IE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQ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lYl92aWV3X2xvYWRfaHRtbF9zdHJpbmcoZml4
dHVyZS0+d2ViVmlldywgSFRNTF9TVFJJTkcsIDApOworICAgIGdfaWRsZV9hZGQoKEdTb3VyY2VG
dW5jKXdlYlZpZXdSZWxvYWRPbklkbGUsIGZpeHR1cmUpOworCisgICAgZ19tYWluX2xvb3BfcnVu
KGZpeHR1cmUtPmxvb3ApOworfQorCiBpbnQgbWFpbihpbnQgYXJnYywgY2hhcioqIGFyZ3YpCiB7
CiAgICAgU291cFNlcnZlciogc2VydmVyOwpAQCAtNDMyLDYgKzQ3NywxMSBAQCBpbnQgbWFpbihp
bnQgYXJnYywgY2hhcioqIGFyZ3YpCiAgICAgICAgICAgICAgICB3ZWJfbG9hZGluZ19maXh0dXJl
X3NldHVwLAogICAgICAgICAgICAgICAgdGVzdF9sb2FkaW5nX2dvYmFjaywKICAgICAgICAgICAg
ICAgIHdlYl9sb2FkaW5nX2ZpeHR1cmVfdGVhcmRvd24pOworICAgIGdfdGVzdF9hZGQoIi93ZWJr
aXQvbG9hZGluZy9yZWxvYWRmcm9tc3RyaW5nIiwKKyAgICAgICAgICAgICAgIFdlYkxvYWRpbmdG
aXh0dXJlLCBOVUxMLAorICAgICAgICAgICAgICAgd2ViX2xvYWRpbmdfZml4dHVyZV9zZXR1cCwK
KyAgICAgICAgICAgICAgIHRlc3RfbG9hZGluZ19yZWxvYWRfZnJvbV9zdHJpbmcsCisgICAgICAg
ICAgICAgICB3ZWJfbG9hZGluZ19maXh0dXJlX3RlYXJkb3duKTsKICAgICByZXR1cm4gZ190ZXN0
X3J1bigpOwogfQogCi0tIAoxLjcuMy4yCgo=
</data>
<flag name="review"
          id="66532"
          type_id="1"
          status="-"
          setter="darin"
    />
          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>77812</attachid>
            <date>2011-01-03 09:33:35 -0800</date>
            <delta_ts>2011-12-05 12:02:57 -0800</delta_ts>
            <desc>Patch proposal + unit test</desc>
            <filename>0001-2011-01-03-Mario-Sanchez-Prada-msanchez-igalia.com.patch</filename>
            <type>text/plain</type>
            <size>7683</size>
            <attacher name="Mario Sanchez Prada">mario</attacher>
            
              <data encoding="base64">RnJvbSBmNmVkZWVlYWE0MTYxMDE3YzUwZGRhNmI4NmNiZDU3ODU2YWQ2NjE5IE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBNYXJpbyBTYW5jaGV6IFByYWRhIDxtc2FuY2hlekBpZ2FsaWEu
Y29tPgpEYXRlOiBNb24sIDMgSmFuIDIwMTEgMTY6Mjk6MDUgKzAxMDAKU3ViamVjdDogW1BBVENI
XSAyMDExLTAxLTAzICBNYXJpbyBTYW5jaGV6IFByYWRhICA8bXNhbmNoZXpAaWdhbGlhLmNvbT4K
CiAgICAgICAgUmV2aWV3ZWQgYnkgTk9CT0RZIChPT1BTISkuCgogICAgICAgIEFTU0VSVCBmYWls
aW5nIHJlc3RvcmluZyBzY3JvbGwgcG9zaXRpb24gZnJvbSBIaXN0b3J5SXRlbSBhZnRlciByZWxv
YWQKICAgICAgICBodHRwczovL2J1Z3Mud2Via2l0Lm9yZy9zaG93X2J1Zy5jZ2k/aWQ9NTAzMzEK
CiAgICAgICAgUmVtb3ZlZCBBU1NFUlQgbm90IHRvIGZhaWwgZm9yIGRlYnVnIGJ1aWxkcyBpZiAh
bV9jdXJyZW50SXRlbS4KCiAgICAgICAgU3RpbGwsIHRoZSBjb2RlIGtlZXBzIGJlaW5nIHNhZmUg
YWdhaW5zdCB0aGUgY2FzZSB3aGVyZQogICAgICAgIG1fY3VycmVudEl0ZW0gaXMgemVybywgc2lu
Y2UgYSBzaW1wbGUgbnVsbCBjaGVjayBpcyBzdGlsbCBpbgogICAgICAgIHBsYWNlLCBlYXJseSBy
ZXR1cm5pbmcgZnJvbSB0aGUgZnVuY3Rpb24gaW4gdGhvc2UgY2FzZXMuCgogICAgICAgICogbG9h
ZGVyL0ZyYW1lTG9hZGVyLmNwcDoKICAgIC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WV3UmVsb2FkT25JZGxlLCBmaXh0dXJlKTsKKwor
ICAgIGdfbWFpbl9sb29wX3J1bihmaXh0dXJlLT5sb29wKTsKK30KKwogaW50IG1haW4oaW50IGFy
Z2MsIGNoYXIqKiBhcmd2KQogewogICAgIFNvdXBTZXJ2ZXIqIHNlcnZlcjsKQEAgLTQzMiw2ICs0
NzcsMTEgQEAgaW50IG1haW4oaW50IGFyZ2MsIGNoYXIqKiBhcmd2KQogICAgICAgICAgICAgICAg
d2ViX2xvYWRpbmdfZml4dHVyZV9zZXR1cCwKICAgICAgICAgICAgICAgIHRlc3RfbG9hZGluZ19n
b2JhY2ssCiAgICAgICAgICAgICAgICB3ZWJfbG9hZGluZ19maXh0dXJlX3RlYXJkb3duKTsKKyAg
ICBnX3Rlc3RfYWRkKCIvd2Via2l0L2xvYWRpbmcvcmVsb2FkZnJvbXN0cmluZyIsCisgICAgICAg
ICAgICAgICBXZWJMb2FkaW5nRml4dHVyZSwgTlVMTCwKKyAgICAgICAgICAgICAgIHdlYl9sb2Fk
aW5nX2ZpeHR1cmVfc2V0dXAsCisgICAgICAgICAgICAgICB0ZXN0X2xvYWRpbmdfcmVsb2FkX2Zy
b21fc3RyaW5nLAorICAgICAgICAgICAgICAgd2ViX2xvYWRpbmdfZml4dHVyZV90ZWFyZG93bik7
CiAgICAgcmV0dXJuIGdfdGVzdF9ydW4oKTsKIH0KIAotLSAKMS43LjMuNAoK
</data>
<flag name="review"
          id="69003"
          type_id="1"
          status="-"
          setter="abarth"
    />
          </attachment>
      

    </bug>

</bugzilla>