repo.or.cz
/
qtwebkit.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
history
|
raw
|
HEAD
Update ReadMe.md
[qtwebkit.git]
/
JSTests
/
microbenchmarks
/
try-catch-get-by-val-direct-arguments.js
blob
d8717ef6ad0f45611c68cbc5c965bc7efd018448
1
function foo() {
2
try {
3
return arguments[0];
4
} catch (e) {
5
return 42;
6
}
7
}
8
9
var n = 100000;
10
var result = 0;
11
for (var i = 0; i < n; ++i)
12
result += foo(24);
13
14
if (result != n * 24)
15
throw "Error: bad result: " + result;
16
17
result = foo();
18
if (result !== void 0)
19
throw "Error: bad result at end: " + result;