tor-browser

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

S10.4_A1.1_T1.js (514B)


      1 // Copyright 2009 the Sputnik authors.  All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 
      4 /*---
      5 info: Every function call enters a new execution context
      6 es5id: 10.4_A1.1_T1
      7 description: Sequence of function calls
      8 ---*/
      9 
     10 var y;
     11 
     12 function f(){
     13  var x;
     14 
     15  if(x === undefined) {
     16    x = 0;
     17  } else {
     18    x = 1;
     19  }
     20 
     21  return x;
     22 }
     23 
     24 y = f();
     25 y = f();
     26 
     27 if(!(y === 0)){
     28  throw new Test262Error("#1: Sequenced function calls shares execution context");
     29 }
     30 
     31 reportCompare(0, 0);