<?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>12912</bug_id>
          
          <creation_ts>2007-02-27 11:34:36 -0800</creation_ts>
          <short_desc>Variable scoping rules incorrectly evaluated</short_desc>
          <delta_ts>2007-07-11 21:22:24 -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>JavaScriptCore</component>
          <version>523.x (Safari 3)</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.4</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Critical</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Dan Waylonis">waylonis</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
    
    <cc>zwarich</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>21102</commentid>
    <comment_count>0</comment_count>
    <who name="Dan Waylonis">waylonis</who>
    <bug_when>2007-02-27 11:34:36 -0800</bug_when>
    <thetext>On both Safari 10.4.8 and TOT WebKit, the JavaScript code is incorrectly evaluated.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21103</commentid>
    <comment_count>1</comment_count>
      <attachid>13405</attachid>
    <who name="Dan Waylonis">waylonis</who>
    <bug_when>2007-02-27 11:35:48 -0800</bug_when>
    <thetext>Created attachment 13405
HTML page that illustrates the evaluation failure.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20931</commentid>
    <comment_count>2</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2007-02-27 22:26:33 -0800</bug_when>
    <thetext>See also: bug 7751, bug 11399 (duplicates?)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>5048</commentid>
    <comment_count>3</comment_count>
    <who name="Cameron Zwarich (cpst)">zwarich</who>
    <bug_when>2007-07-10 17:19:22 -0700</bug_when>
    <thetext>This bug seems to be fixed in TOT, as the test case runs correctly.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>5030</commentid>
    <comment_count>4</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2007-07-10 22:27:42 -0700</bug_when>
    <thetext>(In reply to comment #3)
&gt; This bug seems to be fixed in TOT, as the test case runs correctly.

(In reply to comment #2)
&gt; See also: bug 7751, bug 11399 (duplicates?)

Attachment 13405 runs correctly with a local debug build of WebKit r24147 with Safari 3.0 (522.12) on Mac OS X 10.4.10 (8R218).  However, the tests for Bug 7751 and Bug 11399 are still broken.

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>5021</commentid>
    <comment_count>5</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2007-07-11 05:07:58 -0700</bug_when>
    <thetext>That&apos;s interesting! I think we need to research when this was fixed and whether a test case was landed with the fix.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>5002</commentid>
    <comment_count>6</comment_count>
    <who name="Cameron Zwarich (cpst)">zwarich</who>
    <bug_when>2007-07-11 13:32:52 -0700</bug_when>
    <thetext>The bug is still in the r21388 nightly, but is fixed by the r21420 nightly. The revision that fixes it is 21409, which only changes one source code file, nodes2string.cpp. The specific change that fixes the bug is the first in the diff &lt;http://trac.webkit.org/projects/webkit/changeset/21409&gt;. Since the patch is so small and specific, I think the regression tests from that revision adequately cover this bug.

Bug 7751 is probably not a bug, as I noted there, and bug 11399, according to Geoff Garen&apos;s comment, is due to a choice (deliberate or not) regarding the behaviour of inner windows.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4981</commentid>
    <comment_count>7</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2007-07-11 21:22:24 -0700</bug_when>
    <thetext>Marking as fixed per the above comment.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>13405</attachid>
            <date>2007-02-27 11:35:48 -0800</date>
            <delta_ts>2007-02-27 11:35:48 -0800</delta_ts>
            <desc>HTML page that illustrates the evaluation failure.</desc>
            <filename>ScopeFailure.html</filename>
            <type>text/html</type>
            <size>1916</size>
            <attacher name="Dan Waylonis">waylonis</attacher>
            
              <data encoding="base64">PGh0bWw+Cjx0aXRsZT5TY29waW5nIFRlc3Q8L3RpdGxlPgo8c2NyaXB0IHR5cGU9InRleHQvamF2
YXNjcmlwdCI+Ci8qIEEgdGVzdCB0byBzaG93IHRoYXQgc2NvcGluZyBydWxlcyBjYW4gYmUgY29u
ZnVzZWQgKi8KCmZ1bmN0aW9uIEFwcGVuZFN0cihkaXZOYW1lLCBzdHIpIHsgCiAgdmFyIGRpdiA9
IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKGRpdk5hbWUpOwogIGRpdi5hcHBlbmRDaGlsZChkb2N1
bWVudC5jcmVhdGVUZXh0Tm9kZShzdHIpKTsKICBkaXYuYXBwZW5kQ2hpbGQoZG9jdW1lbnQuY3Jl
YXRlRWxlbWVudCgiYnIiKSk7Cn0KCmZ1bmN0aW9uIExvZyhzdHIpIHsgQXBwZW5kU3RyKCJMb2ci
LCBzdHIpOyB9CmZ1bmN0aW9uIE91dHB1dChzdHIpIHsgQXBwZW5kU3RyKCJPdXRwdXQiLCBzdHIp
OyB9CgpmdW5jdGlvbiB0ZXN0MCgpIHsgT3V0cHV0KCJ0ZXN0MCIpOyByZXR1cm4gdHJ1ZTsgfQpm
dW5jdGlvbiB0ZXN0MSgpIHsgT3V0cHV0KCJ0ZXN0MSIpOyByZXR1cm4g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