Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(40)

Unified Diff: test/mjsunit/fuzz-natives.js

Issue 1148007: Merge bleeding_edge from version 2.1.3 up to revision 4205... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/partial_snapshots/
Patch Set: Created 10 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: test/mjsunit/fuzz-natives.js
===================================================================
--- test/mjsunit/fuzz-natives.js (revision 4205)
+++ test/mjsunit/fuzz-natives.js (working copy)
@@ -57,9 +57,17 @@
return new Function(args.join(", "), "return %" + name + "(" + argsStr + ");");
}
-function testArgumentCount(name) {
+function testArgumentCount(name, argc) {
for (var i = 0; i < 10; i++) {
- var func = makeFunction(name, i);
+ var func = null;
+ try {
+ func = makeFunction(name, i);
+ } catch (e) {
+ if (e != "SyntaxError: illegal access") throw e;
+ }
+ if (func === null && i == argc) {
+ throw "unexpected exception";
+ }
var args = [ ];
for (var j = 0; j < i; j++)
args.push(0);
@@ -176,7 +184,7 @@
continue;
print(name);
var argc = nativeInfo[1];
- testArgumentCount(name);
+ testArgumentCount(name, argc);
testArgumentTypes(name, argc);
}
}

Powered by Google App Engine
This is Rietveld 408576698