repo.or.cz
/
chromium-blink-merge.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
history
|
raw
|
HEAD
Merge Chromium + Blink git repositories
[chromium-blink-merge.git]
/
third_party
/
WebKit
/
LayoutTests
/
fast
/
js
/
regress
/
script-tests
/
object-closure-call.js
blob
e3132c62981bc61f9802794a7e1195868526d3cd
1
function makeObjectClosure(value) {
2
function foo() {
3
return this.x;
4
}
5
return {foo:foo, x:value};
6
}
7
8
var result = 0;
9
for (var i = 0; i < 10000; ++i) {
10
var o = makeObjectClosure(i);
11
for (var j = 0; j < 100; ++j)
12
result += o.foo();
13
}
14
15
print(result);