tor-browser

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

name-eval-strict-body.js (482B)


      1 // |reftest| error:SyntaxError
      2 // Copyright (c) 2012 Ecma International.  All rights reserved.
      3 // This code is governed by the BSD license found in the LICENSE file.
      4 
      5 /*---
      6 es5id: 13.1-38-s
      7 description: >
      8    StrictMode - SyntaxError is thrown if 'eval' occurs as the
      9    Identifier of a FunctionExpression whose FunctionBody is contained
     10    in strict code
     11 negative:
     12  phase: parse
     13  type: SyntaxError
     14 flags: [noStrict]
     15 ---*/
     16 
     17 $DONOTEVALUATE();
     18 
     19 (function eval() {'use strict';});