tor-browser

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

S13.2.2_A19_T5.js (874B)


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