WebCore:
authordglazkov@chromium.org <dglazkov@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 12 Mar 2009 19:34:02 +0000 (19:34 +0000)
committerdglazkov@chromium.org <dglazkov@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 12 Mar 2009 19:34:02 +0000 (19:34 +0000)
commitf52094313e93278be2fe55ce99fe41cdf954c27a
tree84718ecbff68061bb5dbfb7b8038863778ff51b9
parent674c0c0cb5c393eba6686236504050df3938b9fa
WebCore:

2009-03-12  Dimitri Glazkov  <dglazkov@chromium.org>

        Reviewed by Simon Fraser.

        https://bugs.webkit.org/show_bug.cgi?id=24496
        Fix console logging of non-string values by coercing the argument to
        a string.

        Test: fast/js/console-non-string-values.html

        * bindings/js/ScriptValue.cpp: Removed PlatformString include.
        * bindings/js/ScriptValue.h: Added toString method.
        (WebCore::ScriptValue::toString):
        * page/Console.cpp:
        (WebCore::getFirstArgumentAsString): Changed firstArgumentAsString method to use
            ScriptValue::toString.
        (WebCore::Console::addMessage): added extra ScriptState argument to callsite.
        (WebCore::Console::count): Ditto.

LayoutTests:

2009-03-12  Simon Fraser  <simon.fraser@apple.com>

        Reviewed by Dimitri Glazkov.

        https://bugs.webkit.org/show_bug.cgi?id=24496
        Test for logging non-string values.

        * fast/js/console-non-string-values-expected.txt: Added.
        * fast/js/console-non-string-values.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@41640 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/js/console-non-string-values-expected.txt [new file with mode: 0644]
LayoutTests/fast/js/console-non-string-values.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/bindings/js/ScriptValue.cpp
WebCore/bindings/js/ScriptValue.h
WebCore/page/Console.cpp