tor-browser

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

12.14-14.js (669B)


      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-14
      6 description: >
      7    Exception object is a function, when an exception parameter is
      8    called as a function in catch block, global object is passed as
      9    the this value
     10 flags: [noStrict]
     11 ---*/
     12 
     13 var global = this;
     14 var result;
     15 
     16 (function() {
     17        try {
     18            throw function () {
     19                this._12_14_14_foo = "test";
     20            };
     21        } catch (e) {
     22            e();
     23            result = global._12_14_14_foo;
     24        }
     25 })();
     26 
     27 assert.sameValue(result, "test", 'result');
     28 
     29 reportCompare(0, 0);