tor-browser

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

execution-observability-03.js (445B)


      1 // Tests that bare callVMs (in the delprop below) are patched correctly.
      2 
      3 var o = {};
      4 var global = this;
      5 var p = new Proxy(o, {
      6  "deleteProperty": function (target, key) {
      7    var g = newGlobal({newCompartment: true});
      8    g.parent = global;
      9    g.eval("var dbg = new Debugger(parent); dbg.onEnterFrame = function(frame) {};");
     10    return true;
     11  }
     12 });
     13 function test() {
     14  for (var i=0; i<100; i++) {}
     15  assertEq(delete p.foo, true);
     16 }
     17 test();