tor-browser

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

async-lazy.js (493B)


      1 async function f1(a, b) {
      2  let x = await 10;
      3  return x;
      4 };
      5 var toStringResult = f1.toString();
      6 
      7 async function f2(a, b) {
      8  // arguments.callee gets wrapped function from unwrapped function.
      9  return arguments.callee;
     10 };
     11 
     12 relazifyFunctions();
     13 
     14 // toString gets unwrapped function from wrapped function.
     15 assertEq(f1.toString(), toStringResult);
     16 
     17 var ans = 0;
     18 f1().then(x => { ans = x; });
     19 drainJobQueue();
     20 assertEq(ans, 10);
     21 
     22 f2().then(x => { ans = x; });
     23 drainJobQueue();
     24 assertEq(ans, f2);