tor-browser

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

S13.2.2_A19_T4.js (857B)


      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: Function's scope chain is started when it is declared
      6 es5id: 13.2.2_A19_T4
      7 description: >
      8    Function is declared in the hierarchical object scope and then an
      9    exception is thrown
     10 flags: [noStrict]
     11 ---*/
     12 
     13 var a = 1;
     14 
     15 var __obj = {a:2,__obj:{a:3}};
     16 
     17 try {
     18 with (__obj)
     19    {
     20        with(__obj){
     21            var __func = function(){return a;};
     22            throw 5;
     23        }
     24    }
     25 } catch (e) {
     26 ;
     27 }
     28 
     29 result = __func();
     30 
     31 //////////////////////////////////////////////////////////////////////////////
     32 //CHECK#1
     33 if (result !== 3) {
     34 throw new Test262Error('#1: result === 3. Actual: result ==='+result);
     35 }
     36 //
     37 //////////////////////////////////////////////////////////////////////////////
     38 
     39 reportCompare(0, 0);