tor-browser

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

delazification-mode-01.js (571B)


      1 //|jit-test| skip-if: isLcovEnabled() || helperThreadCount() === 0
      2 
      3 // GCs might trash the stencil cache. Prevent us from scheduling too many GCs.
      4 if ('gczeal' in this) {
      5    gczeal(0);
      6 }
      7 
      8 let source = `
      9  function foo() {
     10    return "foo";
     11  }
     12 
     13  waitForDelazificationOf(foo);
     14  // false would be expected if threads are disabled.
     15  assertEq(isDelazificationPopulatedFor(foo), true);
     16 `;
     17 
     18 const options = {
     19    fileName: "inner-01.js",
     20    lineNumber: 1,
     21    eagerDelazificationStrategy: "CheckConcurrentWithOnDemand",
     22    newContext: true,
     23 };
     24 evaluate(source, options);