tor-browser

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

arguments_callee.js (686B)


      1 // |reftest| skip-if(!xulRuntime.shell) -- needs drainJobQueue
      2 
      3 var BUGNUMBER = 1185106;
      4 var summary = "arguments.callee in sloppy mode should return wrapped function";
      5 
      6 print(BUGNUMBER + ": " + summary);
      7 
      8 async function decl1() {
      9  return arguments.callee;
     10 }
     11 assertEventuallyEq(decl1(), decl1);
     12 
     13 var expr1 = async function foo() {
     14  return arguments.callee;
     15 };
     16 assertEventuallyEq(expr1(), expr1);
     17 
     18 var expr2 = async function() {
     19  return arguments.callee;
     20 };
     21 assertEventuallyEq(expr2(), expr2);
     22 
     23 var obj = {
     24  async method1() {
     25    return arguments.callee;
     26  }
     27 };
     28 assertEventuallyEq(obj.method1(), obj.method1);
     29 
     30 if (typeof reportCompare === "function")
     31    reportCompare(true, true);