Patch contributed by Oliver Hunt <ojh16@student.canterbury.ac.nz>
-fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=3743
Incorrect error message given for certain calls
See WebCore Changelog for layout test added.
Reviewed by mjs.
* kjs/object.cpp:
(KJS::ObjectImp::defaultValue):
WebCore:
-added test case for fix to http://bugzilla.opendarwin.org/show_bug.cgi?id=3743
Incorrect error message given for certain calls
See JavaScriptCore Changelog for details about the patch.
Reviewed by me.
Test cases added:
* layout-tests/fast/js/toString-stack-overflow-expected.txt: Added.
* layout-tests/fast/js/toString-stack-overflow.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@9526
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2005-06-29 Geoffrey Garen <ggaren@apple.com>
+
+ Patch contributed by Oliver Hunt <ojh16@student.canterbury.ac.nz>
+
+ -fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=3743
+ Incorrect error message given for certain calls
+
+ See WebCore Changelog for layout test added.
+
+ Reviewed by mjs.
+
+ * kjs/object.cpp:
+ (KJS::ObjectImp::defaultValue):
+
2005-06-29 Geoffrey Garen <ggaren@apple.com>
Rolling out date patch from 6-28-05 because it breaks
}
}
+ if (exec->hadException())
+ return exec->exception();
+
Object err = Error::create(exec, TypeError, I18N_NOOP("No default value"));
exec->setException(err);
return err;
--- /dev/null
+This test checks for a regression against http://bugzilla.opendarwin.org/show_bug.cgi?id=3743: Incorrect error message given for certain calls.
+
+On success, you should see: RangeError - Maximum call stack size exceeded.
+
+The test confirms that the correct exception is thrown in the event of a stack overflow during a call to Array.toString.
+
+It is possible that this may need to be updated if WebKit gets an improvement to its JavaScript stack support. Either through increasing the depth of the recursion, or through some other mechanism.
+
+RangeError - Maximum call stack size exceeded.
+
--- /dev/null
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<title>Testing the exception thrown by Array.toString</title>
+<script language="javascript">
+function init(){
+ var ary=[0];
+ for(var i=1; i<10000; i++)
+ ary=[ary, i];
+
+ var out;
+ try{
+ out=ary.toString();
+ }catch(e){
+ out=e;
+ }
+
+ document.getElementById("r0c0").firstChild.nodeValue = out;
+ if (window.layoutTestController) {
+ window.layoutTestController.dumpAsText();
+ }
+}
+</script>
+</head>
+<body onload="init()">
+<p>This test checks for a regression against <a href="http://bugzilla.opendarwin.org/show_bug.cgi?id=3743">http://bugzilla.opendarwin.org/show_bug.cgi?id=3743</a>: Incorrect error message given for certain calls.</p>
+<p>On success, you should see: RangeError - Maximum call stack size exceeded.</p>
+<p>The test confirms that the correct exception is thrown in the event of a stack overflow during a call to Array.toString. </p>
+<p>It is possible that this may need to be updated if WebKit gets an improvement to its JavaScript stack support. Either through increasing the depth of the recursion, or through some other mechanism.</p>
+<hr>
+<table cellpadding="2" cellspacing="2" border="1">
+<tbody>
+<tr>
+<td id="r0c0"> </td>
+</tr>
+</tbody>
+</table>
+</body>
+</html>
+2005-06-29 Geoffrey Garen <ggaren@apple.com>
+
+ -added test case for fix to http://bugzilla.opendarwin.org/show_bug.cgi?id=3743
+ Incorrect error message given for certain calls
+
+ See JavaScriptCore Changelog for details about the patch.
+
+ Reviewed by me.
+
+ Test cases added:
+ * layout-tests/fast/js/toString-stack-overflow-expected.txt: Added.
+ * layout-tests/fast/js/toString-stack-overflow.html: Added.
+
2005-06-29 Justin Garcia <justin.garcia@apple.com>
- Fixes <http://bugzilla.opendarwin.org/show_bug.cgi?id=3714>