tor-browser

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

metadata-hook-on-stack.js (398B)


      1 // JSOP_NEWOBJECT should respect the metadata hook, even if
      2 // it's set with scripts on the stack.
      3 
      4 function f() {
      5    for (var i=0; i<100; i++) {
      6 if (i === 20)
      7     enableShellAllocationMetadataBuilder();
      8 var o = {x: 1};
      9 if (i >= 20) {
     10     var md = getAllocationMetadata(o);
     11     assertEq(typeof md === "object" && md !== null, true);
     12     assertEq(typeof md.index, "number");
     13 }
     14    }
     15 }
     16 f();