tor-browser

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

var-env-func-non-strict.js (544B)


      1 // Copyright (C) 2016 the V8 project authors. All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 /*---
      4 esid: sec-performeval
      5 es5id: 10.4.2.1-4-s
      6 description: >
      7    Non-stict mode direct eval code cannot instantiate functions in the
      8    variable environment of the caller
      9 flags: [noStrict]
     10 ---*/
     11 
     12 var typeofInside;
     13 
     14 (function() {
     15  eval('function fun() {}');
     16  typeofInside = typeof fun;
     17 }());
     18 
     19 assert.sameValue(typeofInside, 'function');
     20 assert.sameValue(typeof fun, 'undefined');
     21 
     22 reportCompare(0, 0);