blob: 7da39075a2d464dc2e4318318a0e22d6ac82406b [file] [log] [blame]
var createDOMJITGetterObject = $vm.createDOMJITGetterObject;
function shouldBe(actual, expected) {
if (actual !== expected)
throw new Error(`bad value: ${String(actual)}`);
}
var domjit = createDOMJITGetterObject();
function access(domjit)
{
return domjit.customGetter + domjit.customGetter;
}
for (var i = 0; i < 1e4; ++i)
shouldBe(access(domjit), 84);
shouldBe(access({ customGetter: 42 }), 84);
domjit.test = 44;
shouldBe(access(domjit), 84);