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
/
custom-value-2.js
blob
6ca2742df1c8d98386471ef8a9347b26cea01ff9
1
function assert(b) {
2
if (!b)
3
throw new Error;
4
}
5
6
function test1() {
7
function getMultiline(o) {
8
return o.multiline;
9
}
10
noInline(getMultiline);
11
12
RegExp.foo = 42;
13
14
const o = {};
15
o.__proto__ = RegExp;
16
RegExp.multiline = false;
17
18
for (let i = 0; i < 5000000; ++i) {
19
assert(getMultiline(o) === false);
20
}
21
delete RegExp.foo;
22
for (let i = 0; i < 5000000; ++i) {
23
assert(getMultiline(o) === false);
24
}
25
}
26
test1();