tor-browser

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

12.14-9.js (461B)


      1 // Copyright (c) 2012 Ecma International.  All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 
      4 /*---
      5 es5id: 12.14-9
      6 description: catch introduces scope - name lookup finds outer variable
      7 ---*/
      8 
      9  function f(o) {
     10    var x = 42;
     11 
     12    function innerf(o) {
     13      try {
     14        throw o;
     15      }
     16      catch (e) {
     17        return x;
     18      }
     19    }
     20 
     21    return innerf(o);
     22  }
     23 
     24 assert.sameValue(f({}), 42);
     25 
     26 reportCompare(0, 0);