<?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>3552</bug_id>
          
          <creation_ts>2005-06-15 14:44:44 -0700</creation_ts>
          <short_desc>Anomaly (infinite loop) with window.location.href=&apos;#foo&apos;</short_desc>
          <delta_ts>2006-02-08 11:09:01 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>JavaScriptCore</component>
          <version>412</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.4</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>7058</dup_id>
          
          <bug_file_loc>http://www.s-seven.net/safari_bug.html</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>HasReduction</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>7080</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Benjamin Morin">ben</reporter>
          <assigned_to name="Maciej Stachowiak">mjs</assigned_to>
          <cc>joost</cc>
    
    <cc>sullivan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>12152</commentid>
    <comment_count>0</comment_count>
    <who name="Benjamin Morin">ben</who>
    <bug_when>2005-06-15 14:44:44 -0700</bug_when>
    <thetext>In Safari 1.3/2.0 and Safari 2.0 using the latest CVS WebKit as of this report, executing the javascipt 
window.location.href=&apos;#foo&apos; causes the activity indicator to spin constantly, even though the page 
appears to have loaded successfully and works as designed.  This is especially visible when tabbed 
browsing is enabled as there is an activity indicator on the tab.  It also appears that the &quot;Stop&quot; toolbar 
button never turns back into the &quot;Reload Page&quot; button.  While this is happening, if you select &quot;Reload 
Page&quot; from the &quot;View&quot; menu, it appears as though the page attempts to load over and over again.

Steps to Reproduce: 
Create an html document with the following:
&lt;html&gt;&lt;body&gt;
&lt;h3 id=&quot;h_value&quot;&gt;h_value&lt;/h3&gt;&lt;p&gt;This is under h_value&lt;/p&gt;
&lt;script type=&quot;text/javascript&quot;&gt;window.location.href=&apos;#h_value&apos;;&lt;/script&gt;
&lt;/body&gt;&lt;/html&gt;

Expected Results: 
The page should load and the activity indicator should stop spinning.

Actual Results: 
The page loads and the activity indicator does not stop spinning and if reload page is selected from the 
view menu, the page loads in an infinite loop.

Regression: 
The problem did not exist in Safari 1.2.4.

Notes: 
An online example can be seen at http://www.s-seven.net/safari_bug.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12155</commentid>
    <comment_count>1</comment_count>
      <attachid>2375</attachid>
    <who name="Benjamin Morin">ben</who>
    <bug_when>2005-06-15 14:58:18 -0700</bug_when>
    <thetext>Created attachment 2375
Code to demonstrate Bug 3552.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12205</commentid>
    <comment_count>2</comment_count>
    <who name="Joost de Valk (AlthA)">joost</who>
    <bug_when>2005-06-16 00:09:03 -0700</bug_when>
    <thetext>Confirmed, and an ugly one it is!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>15747</commentid>
    <comment_count>3</comment_count>
      <attachid>3210</attachid>
    <who name="David Carson">dacarson</who>
    <bug_when>2005-08-02 15:45:16 -0700</bug_when>
    <thetext>Created attachment 3210
Another example of defect.

Similarly, you can&apos;t access the DOM after a call to location.hash. See
attachement.
If a style is added, such as:
&lt;style&gt; DIV.t:first-letter {text-transform:uppercase;} &lt;/style&gt;
Safari will crash as it tries to update a DOM element that has disappeared.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>28700</commentid>
    <comment_count>4</comment_count>
    <who name="Benjamin Morin">ben</who>
    <bug_when>2006-01-17 09:33:04 -0800</bug_when>
    <thetext>UPDATE: In WebKit SVN r12148, though there is nothing to indicate a change specific to this bug, hitting 
the &quot;Stop&quot; button or selecting the &quot;Stop&quot; menu item does stop the activity indicator and selecting the 
&quot;Reload&quot; page menu item doesn&apos;t seem to create the infinite loop, though the progress indicator doesn&apos;t 
stop on page load as it should indicating that there is still a problem here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>31420</commentid>
    <comment_count>5</comment_count>
    <who name="Joost de Valk (AlthA)">joost</who>
    <bug_when>2006-02-05 01:18:44 -0800</bug_when>
    <thetext>The infinite loop part of this was filed as bug 7080, to be able to fix both the root cause of this bug and the fact that it goes into an infinite loop.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>31806</commentid>
    <comment_count>6</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2006-02-07 21:21:25 -0800</bug_when>
    <thetext>This bug was fixed with the commit for Bug 7058 (confirmed locally by applying the patch in reverse and rebuilding r12652), so marking it a duplicate of that bug.  Bug 6309 was also fixed at the same time.

Reporter, please verify that this was fixed with nightly r12598 or newer.

Should a test case be prepared and checked in for WebKit to make sure this doesn&apos;t regress?


*** This bug has been marked as a duplicate of 7058 ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>31828</commentid>
    <comment_count>7</comment_count>
    <who name="Benjamin Morin">ben</who>
    <bug_when>2006-02-08 09:38:47 -0800</bug_when>
    <thetext>My test case is confirmed fixed with nightly r12598 or newer.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>31834</commentid>
    <comment_count>8</comment_count>
    <who name="John Sullivan">sullivan</who>
    <bug_when>2006-02-08 10:40:01 -0800</bug_when>
    <thetext>Wow, what a pleasant surprise that this older bug was fixed by the change for 7080. The intention of 7080 was to reverse a regression caused by a very recent code change, so it&apos;s a surprise that it fixed any older case. I guess the new Timer reorganization that led to 7080 improved something about the flow of control here such that, when 7080 was fixed, some old problems were also fixed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>31836</commentid>
    <comment_count>9</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2006-02-08 11:09:01 -0800</bug_when>
    <thetext>Verified by reporter.
</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>2375</attachid>
            <date>2005-06-15 14:58:18 -0700</date>
            <delta_ts>2005-06-15 14:58:18 -0700</delta_ts>
            <desc>Code to demonstrate Bug 3552.</desc>
            <filename>safari_bug_3552.html</filename>
            <type>text/html</type>
            <size>1694</size>
            <attacher name="Benjamin Morin">ben</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIEhUTUwgUFVCTElDICItLy9XM0MvL0RURCBIVE1MIDQuMDEvL0VOIiAiaHR0cDov
L3d3dy53My5vcmcvVFIvaHRtbDQvc3RyaWN0LmR0ZCI+Cgo8aHRtbD4KPGhlYWQ+Cgo8c2NyaXB0
IHR5cGU9InRleHQvamF2YXNjcmlwdCI+CmZ1bmN0aW9uIGZvbygpCnsKCXdpbmRvdy5sb2NhdGlv
bi5ocmVmPScjaF92YWx1ZTYnOwp9Cjwvc2NyaXB0PgoKPC9oZWFkPgoKCjxib2R5IG9ubG9hZD0i
amF2YXNjcmlwdDpmb28oKTsiPgo8aHI+CjxoMiBpZD0iaF92YWx1ZTEiPmhfdmFsdWUxPC9oMj4K
PHA+VGhpcyBpcyB1bmRlciBoX3ZhbHVlMTwvcD4KPGJyPgo8aDIgaWQ9ImhfdmFsdWUyIj5oX3Zh
bHVlMjwvaDI+CjxwPlRoaXMgaXMgdW5kZXIgaF92YWx1ZTI8L3A+Cjxicj4KPGgyIGlkPSJoX3Zh
bHVlMyI+aF92YWx1ZTM8L2gyPgo8cD5UaGlzIGlzIHVuZGVyIGhfdmFsdWUzPC9wPgo8YnI+Cjxo
MiBpZD0iaF92YWx1ZTQiPmhfdmFsdWU0PC9oMj4KPHA+VGhpcyBpcyB1bmRlciBoX3ZhbHVlNDwv
cD4KPGJyPgo8aDI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G8gbG9hZCBpbmZpbml0ZWx5LiAg
CjwvbGk+CjwvdWw+Cjxocj4KPGgyIGlkPSJoX3ZhbHVlNyI+aF92YWx1ZTc8L2gyPgo8cD5UaGlz
IGlzIHVuZGVyIGhfdmFsdWU3PC9wPgo8YnI+CjxoMiBpZD0iaF92YWx1ZTgiPmhfdmFsdWU4PC9o
Mj4KPHA+VGhpcyBpcyB1bmRlciBoX3ZhbHVlODwvcD4KPGJyPgo8aDIgaWQ9ImhfdmFsdWU5Ij5o
X3ZhbHVlOTwvaDI+CjxwPlRoaXMgaXMgdW5kZXIgaF92YWx1ZTk8L3A+Cjxicj4KPGgyIGlkPSJo
X3ZhbHVlMTAiPmhfdmFsdWUxMDwvaDI+CjxwPlRoaXMgaXMgdW5kZXIgaF92YWx1ZTEwPC9wPgo8
YnI+CjxoMiBpZD0iaF92YWx1ZTExIj5oX3ZhbHVlMTE8L2gyPgo8cD5UaGlzIGlzIHVuZGVyIGhf
dmFsdWUxMTwvcD4KPGJyPgo8aHI+CjwvYm9keT4KCjwvaHRtbD4KIAo=
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>3210</attachid>
            <date>2005-08-02 15:45:16 -0700</date>
            <delta_ts>2005-08-02 15:45:16 -0700</delta_ts>
            <desc>Another example of defect.</desc>
            <filename>location_test.html</filename>
            <type>text/html</type>
            <size>382</size>
            <attacher name="David Carson">dacarson</attacher>
            
              <data encoding="base64">PGh0bWw+DQo8aGVhZD4NCjxzY3JpcHQ+DQpmdW5jdGlvbiB1cGRhdGVIZWFkaW5nKCkgew0KICAg
IHZhciBlbCA9IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCdIZWFkaW5nJyk7DQogICAgZWwuaW5u
ZXJIVE1MID0gImJlZm9yZSBjYWxsIHRvIGxvY2F0aW9uIjsNCiAgICBsb2NhdGlvbi5oYXNoPSIz
IjsNCiAgICBlbC5pbm5lckhUTUwgPSAiYWZ0ZXIgY2FsbCI7DQp9DQoNCjwvc2NyaXB0Pg0KPC9o
ZWFkPg0KPGJvZHk+DQoNCjxkaXYgY2xhc3M9dCBpZD0nSGVhZGluZyc+SGVhZGluZzwvZGl2Pjxi
cj4NCjxhIGhyZWY9ImphdmFzY3JpcHQ6dXBkYXRlSGVhZGluZygpIj5qcyB1cGRhdGUgaGVhZGlu
ZyBhbmQgbG9jYXRpb248L2E+PGJyPg0KPC9ib2R5Pg0KPC9odG1sPg==
</data>

          </attachment>
      

    </bug>

</bugzilla>