tor-browser

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

Memory-drainAllocationsLog-02.js (410B)


      1 // Test that drainAllocationsLog fails when we aren't trackingAllocationSites.
      2 
      3 load(libdir + 'asserts.js');
      4 
      5 const root = newGlobal();
      6 const dbg = new Debugger();
      7 
      8 dbg.memory.trackingAllocationSites = true;
      9 root.eval("this.alloc1 = {}");
     10 dbg.memory.trackingAllocationSites = false;
     11 root.eval("this.alloc2 = {};");
     12 
     13 assertThrowsInstanceOf(() => dbg.memory.drainAllocationsLog(),
     14                       Error);