2011-01-18 Darin Adler <darin@apple.com>
authordarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 20 Jan 2011 01:53:50 +0000 (01:53 +0000)
committerdarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 20 Jan 2011 01:53:50 +0000 (01:53 +0000)
commit4cd37c3172b7c1be2de934c34b55640264e40d3f
tree6e0f7f9138618de02d037e48b7d9589dc2be8866
parenta9399231cef0dcc958b6f91b4120860dbcb73b66
2011-01-18  Darin Adler  <darin@apple.com>

        Reviewed by Geoffrey Garen.

        Stack overflow when converting an Error object to string
        https://bugs.webkit.org/show_bug.cgi?id=46410

        * fast/js/script-tests/toString-recursion.js: Added.
        * fast/js/toString-recursion-expected.txt: Added.
        * fast/js/toString-recursion.html: Added.
2011-01-18  Darin Adler  <darin@apple.com>

        Reviewed by Geoffrey Garen.

        Stack overflow when converting an Error object to string
        https://bugs.webkit.org/show_bug.cgi?id=46410

        * Android.mk: Added StringRecursionChecker.cpp and
        StringRecursionChecker.h.
        * CMakeLists.txt: Ditto.
        * GNUmakefile.am: Ditto.
        * JavaScriptCore.gypi: Ditto.
        * JavaScriptCore.pro: Ditto.
        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Ditto.
        * JavaScriptCore.xcodeproj/project.pbxproj: Ditto.

        * runtime/ArrayPrototype.cpp:
        (JSC::arrayProtoFuncToString): Use StringRecursionChecker instead
        of the older hand-written code to do the same thing.
        (JSC::arrayProtoFuncToLocaleString): Ditto.
        (JSC::arrayProtoFuncJoin): Ditto.

        * runtime/ErrorPrototype.cpp:
        (JSC::errorProtoFuncToString): Use StringRecursionChecker.

        * runtime/JSGlobalData.h: Renamed arrayVisitedElements to
        stringRecursionCheckVisitedObjects.

        * runtime/RegExpPrototype.cpp:
        (JSC::regExpProtoFuncToString): Use StringRecursionChecker.

        * runtime/StringRecursionChecker.cpp: Added.
        * runtime/StringRecursionChecker.h: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76185 268f45cc-cd09-0410-ab3c-d52691b4dbfc
18 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/js/script-tests/toString-recursion.js [new file with mode: 0644]
LayoutTests/fast/js/toString-recursion-expected.txt [new file with mode: 0644]
LayoutTests/fast/js/toString-recursion.html [new file with mode: 0644]
Source/JavaScriptCore/Android.mk
Source/JavaScriptCore/CMakeLists.txt
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/GNUmakefile.am
Source/JavaScriptCore/JavaScriptCore.gypi
Source/JavaScriptCore/JavaScriptCore.pro
Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj
Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
Source/JavaScriptCore/runtime/ArrayPrototype.cpp
Source/JavaScriptCore/runtime/ErrorPrototype.cpp
Source/JavaScriptCore/runtime/JSGlobalData.h
Source/JavaScriptCore/runtime/RegExpPrototype.cpp
Source/JavaScriptCore/runtime/StringRecursionChecker.cpp [new file with mode: 0644]
Source/JavaScriptCore/runtime/StringRecursionChecker.h [new file with mode: 0644]