Commit 8a10bb96 authored by oliver@apple.com's avatar oliver@apple.com

Lower stringify recursion limit to deal with small windows stack.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44610 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 41bbada4
2009-06-11 Oliver Hunt <oliver@apple.com>
Reviewed by NOBODY (build fix).
Lower stringify recursion limit to deal with small windows stack.
* JavaScriptCore.xcodeproj/project.pbxproj:
* runtime/JSONObject.cpp:
(JSC::Stringifier::):
2009-06-11 Laszlo Gombos <laszlo.1.gombos@nokia.com>
Reviewed by Holger Freyther.
......@@ -80,7 +80,7 @@ class Stringifier {
typedef UString StringBuilder;
// <https://bugs.webkit.org/show_bug.cgi?id=26276> arbitrary limits for recursion
// are bad
enum { MaxObjectDepth = 1600 };
enum { MaxObjectDepth = 512 };
public:
Stringifier(ExecState* exec, JSValue replacer, const UString& gap)
: m_exec(exec)
......
2009-06-11 Oliver Hunt <oliver@apple.com>
Reviewed by NOBODY (build-fix).
Lower stringify recursion limit to deal with small windows stack.
* fast/js/resources/JSON-stringify.js:
* fast/js/JSON-expected.txt:
2009-06-11 Shinichiro Hamaji <hamaji@chromium.org>
Reviewed by Adam Barth.
......@@ -257,14 +257,14 @@ function (jsonObject) {
PASS tests[i](nativeJSON) is tests[i](JSON)
function (jsonObject) {
var deepObject = {};
for (var i = 0; i < 1600; i++)
for (var i = 0; i < 512; i++)
deepObject = {next:deepObject};
return jsonObject.stringify(deepObject);
}
PASS tests[i](nativeJSON) is tests[i](JSON)
function (jsonObject) {
var deepArray = [];
for (var i = 0; i < 1600; i++)
for (var i = 0; i < 512; i++)
deepArray = [deepArray];
return jsonObject.stringify(deepArray);
}
......
......@@ -240,13 +240,13 @@ function createTests() {
});
result.push(function(jsonObject){
var deepObject = {};
for (var i = 0; i < 1600; i++)
for (var i = 0; i < 512; i++)
deepObject = {next:deepObject};
return jsonObject.stringify(deepObject);
});
result.push(function(jsonObject){
var deepArray = [];
for (var i = 0; i < 1600; i++)
for (var i = 0; i < 512; i++)
deepArray = [deepArray];
return jsonObject.stringify(deepArray);
});
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment