tor-browser

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

option-mismatch.js (471B)


      1 var source = `
      2 function f() {
      3    function g() {
      4        return 10;
      5    }
      6    return g();
      7 }
      8 
      9 f()`
     10 
     11 var code = cacheEntry(source);
     12 
     13 
     14 var res = evaluate(code, { saveBytecodeWithDelazifications: true, })
     15 assertEq(res, 10)
     16 
     17 try {
     18    // We should throw here because we have incompatible options!
     19    res = evaluate(code, { loadBytecode: true, sourceIsLazy: true })
     20    assertEq(true, false);
     21 } catch (e) {
     22    assertEq(/Incompatible cache contents/.test(e.message), true);
     23 }