JavaScriptCore:
authordarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 26 Oct 2006 16:39:00 +0000 (16:39 +0000)
committerdarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 26 Oct 2006 16:39:00 +0000 (16:39 +0000)
commit03a655423723befafe23bca462b417ff1a4d7d0c
tree4cc368f2e8ea83df2904b96a9c31162b4082957a
parent7036f4662fb72354acae2255bb7ec38e3cb7529c
JavaScriptCore:

        Reviewed by John.

        - fix iteration of properties of string objects (found because of a warning
          emitted by the MSVC compiler)

        * kjs/string_object.cpp: (StringInstance::getPropertyNames): Change code that
        wants to format a number as a string to use UString::from. Before it was using
        the UString constructor that makes a string from a character!

        * kjs/ustring.h:
        * kjs/ustring.cpp: Remove the dangerous and not all that helpful UString(char)
        constructor.

        * kjs/grammar.y: Change code to not depend on the UString(char) constructor.
        This is potentially more efficient anyway because we could overload the + operator
        some day to handle char* directly instead of creating a UString.

        * kjs/nodes2string.cpp: (SourceStream::operator<<): Change code to not depend on
        the UString(char) constructor.

LayoutTests:

        Reviewed by John.

        - add a test for iteration of properties of string objects

        * fast/js/resources/string-property-iteration.js: Added.
        * fast/js/string-property-iteration-expected.txt: Added.
        * fast/js/string-property-iteration.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@17306 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JavaScriptCore/ChangeLog
JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
JavaScriptCore/kjs/grammar.y
JavaScriptCore/kjs/nodes2string.cpp
JavaScriptCore/kjs/string_object.cpp
JavaScriptCore/kjs/ustring.cpp
JavaScriptCore/kjs/ustring.h
LayoutTests/ChangeLog
LayoutTests/fast/js/resources/string-property-iteration.js [new file with mode: 0644]
LayoutTests/fast/js/string-property-iteration-expected.txt [new file with mode: 0644]
LayoutTests/fast/js/string-property-iteration.html [new file with mode: 0644]