tor-browser

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

12.14-11.js (465B)


      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-11
      6 description: catch introduces scope - name lookup finds inner variable
      7 ---*/
      8 
      9  function f(o) {
     10 
     11    function innerf(o) {
     12      var x = 42;
     13 
     14      try {
     15        throw o;
     16      }
     17      catch (e) {
     18        return x;
     19      }
     20    }
     21 
     22    return innerf(o);
     23  }
     24 
     25 assert.sameValue(f({}), 42);
     26 
     27 reportCompare(0, 0);