tor-browser

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

global-env-rec-eval.js (641B)


      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 es5id: 10.4.2-1-5
      5 description: >
      6    Indirect call to eval has context set to global context (inside
      7    another eval)
      8 ---*/
      9 
     10 var __10_4_2_1_5 = "str";
     11 function testcase() {
     12            var __10_4_2_1_5 = "str1";
     13            var r = eval("\
     14                          var _eval = eval; \
     15                          var __10_4_2_1_5 = \'str2\'; \
     16                          _eval(\"\'str\' === __10_4_2_1_5 \") \
     17                        ");
     18            assert(r);
     19    }
     20 testcase();
     21 
     22 reportCompare(0, 0);