Reduce the amount of memory needed to store Options.
[WebKit-https.git] / JSTests / stress / domjit-getter-proto.js
1 var createDOMJITNodeObject = $vm.createDOMJITNodeObject;
2
3 function shouldBe(actual, expected) {
4     if (actual !== expected)
5         throw new Error(`bad value: ${String(actual)}`);
6 }
7
8 var domjit = createDOMJITNodeObject();
9 function access(domjit)
10 {
11     return domjit.customGetter + domjit.customGetter;
12 }
13
14 for (var i = 0; i < 1e4; ++i)
15     shouldBe(access(domjit), 84);
16
17 shouldBe(access({ customGetter: 42 }), 84);
18 domjit.test = 44;
19 shouldBe(access(domjit), 84);