repo.or.cz
/
qtwebkit.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Update ReadMe.md
[qtwebkit.git]
/
JSTests
/
microbenchmarks
/
string-get-by-val-out-of-bounds-insane.js
blob
728de69fdaf56f28f837eb87dd19507e14de98d1
1
function
foo
(
string
) {
2
var
result
= [
""
,
""
];
3
for
(
var
i
=
0
;
i
<
100000
; ++
i
)
4
result
[
i
&
1
] =
string
[
i
&
1
];
5
return
result
;
6
}
7
8
Object
.
prototype
[
1
] =
42
;
9
10
var
result
=
foo
(
"x"
);
11
if
(
result
[
0
] !=
"x"
)
12
throw
"Bad result[0]: "
+
result
[
0
];
13
if
(
result
[
1
] !=
42
)
14
throw
"Bad result[1]: "
+
result
[
1
];