tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

nursery-getter-setter.js (409B)


      1 var threshold = getJitCompilerOptions()["ion.warmup.trigger"] + 101;
      2 function bar(i) {
      3    if (!i)
      4        with (this) {}; // Don't inline.
      5    if (i === threshold)
      6        minorgc();
      7 }
      8 
      9 function f() {
     10    var o2 = Object.create({get foo() { return this.x; }, set foo(x) { this.x = x + 1; }});
     11    for (var i=0; i<2000; i++) {
     12        o2.foo = i;
     13        assertEq(o2.foo, i + 1);
     14        bar(i);
     15    }
     16 }
     17 f();