tor-browser

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

name-invoke-fn-strict.js (496B)


      1 // Copyright (C) 2015 the V8 project authors. All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 
      4 /*---
      5 description: >
      6    In the presence of the "use strict" directive, functions declared as
      7    methods obey "strict" ThisMode semantics.
      8 es6id: 14.3.8
      9 flags: [noStrict]
     10 ---*/
     11 
     12 var thisValue = null;
     13 var method = {
     14  method() {
     15    'use strict';
     16    thisValue = this;
     17  }
     18 }.method;
     19 
     20 method();
     21 
     22 assert.sameValue(thisValue, undefined);
     23 
     24 reportCompare(0, 0);