[webkit-changes] cvs commit: WebCore/layout-tests/fast/js
toString-stack-overflow-expected.txt toString-stack-overflow.html
Geoffrey
ggaren at opensource.apple.com
Wed Jun 29 13:59:22 PDT 2005
ggaren 05/06/29 13:59:21
Modified: . ChangeLog
kjs object.cpp
. ChangeLog
Added: layout-tests/fast/js toString-stack-overflow-expected.txt
toString-stack-overflow.html
Log:
JavaScriptCore:
Patch contributed by Oliver Hunt <ojh16 at 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.
Revision Changes Path
1.726 +14 -0 JavaScriptCore/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /cvs/root/JavaScriptCore/ChangeLog,v
retrieving revision 1.725
retrieving revision 1.726
diff -u -r1.725 -r1.726
--- ChangeLog 29 Jun 2005 20:14:59 -0000 1.725
+++ ChangeLog 29 Jun 2005 20:59:09 -0000 1.726
@@ -1,5 +1,19 @@
2005-06-29 Geoffrey Garen <ggaren at apple.com>
+ Patch contributed by Oliver Hunt <ojh16 at 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 at apple.com>
+
Rolling out date patch from 6-28-05 because it breaks
fast/js/date-parse-test
1.44 +3 -0 JavaScriptCore/kjs/object.cpp
Index: object.cpp
===================================================================
RCS file: /cvs/root/JavaScriptCore/kjs/object.cpp,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -r1.43 -r1.44
--- object.cpp 22 Jun 2005 00:48:47 -0000 1.43
+++ object.cpp 29 Jun 2005 20:59:10 -0000 1.44
@@ -385,6 +385,9 @@
}
}
+ if (exec->hadException())
+ return exec->exception();
+
Object err = Error::create(exec, TypeError, I18N_NOOP("No default value"));
exec->setException(err);
return err;
1.4330 +13 -0 WebCore/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /cvs/root/WebCore/ChangeLog,v
retrieving revision 1.4329
retrieving revision 1.4330
diff -u -r1.4329 -r1.4330
--- ChangeLog 29 Jun 2005 20:14:54 -0000 1.4329
+++ ChangeLog 29 Jun 2005 20:59:11 -0000 1.4330
@@ -1,3 +1,16 @@
+2005-06-29 Geoffrey Garen <ggaren at 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 at apple.com>
- Fixes <http://bugzilla.opendarwin.org/show_bug.cgi?id=3714>
1.1 WebCore/layout-tests/fast/js/toString-stack-overflow-expected.txt
Index: toString-stack-overflow-expected.txt
===================================================================
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.
1.1 WebCore/layout-tests/fast/js/toString-stack-overflow.html
Index: toString-stack-overflow.html
===================================================================
<!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>
More information about the webkit-changes
mailing list