[Webkit-unassigned] [Bug 19967] New: Variables named "name" become strings

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jul 9 15:01:49 PDT 2008


https://bugs.webkit.org/show_bug.cgi?id=19967

           Summary: Variables named "name" become strings
           Product: WebKit
           Version: 526+ (Nightly build)
          Platform: Macintosh Intel
               URL: http://www.tip.it/runescape/index.php?page=smith_smelt_c
                    alc.htm
        OS/Version: Mac OS X 10.5
            Status: UNCONFIRMED
          Severity: Minor
          Priority: P4
         Component: New Bugs
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: tamal at tamalwhite.com


Run this bit of code in Safari 3.1 or Webkit nightly:

javascript:name=names=new
Array("foo","bar","bang");alert(typeof(name)+"/"+typeof(names));

or

javascript:name=names=function() { return "foo"
};alert(typeof(name)+"/"+typeof(names));

It appears that if the variable name is "name", it is automatically typed as a
string. In the URL provided, this is causing a problem when using name.length
with a for loop. The loop is iterating over every character in the string
instead of elements in an array.


-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list