tor-browser

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

cacheEntry.js (598B)


      1 // These tests are checking that CacheEntry_getBytecode properly set an error
      2 // when there is no bytecode registered.
      3 var caught = 0;
      4 var code = cacheEntry("");
      5 try {
      6    offThreadDecodeStencil(code);
      7 }
      8 catch (e) {
      9    // offThreadDecodeStencil does not work with the --no-thread command line option.
     10    assertEq(e.message.includes("CacheEntry") || e.message.includes("offThreadDecodeStencil"), true);
     11    caught++;
     12 }
     13 
     14 code = cacheEntry("");
     15 try {
     16    evaluate(code, {loadBytecode: true});
     17 }
     18 catch (e) {
     19    assertEq(e.message.includes("CacheEntry"), true);
     20    caught++;
     21 }
     22 
     23 assertEq(caught, 2);