tor-browser

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

eval-this.js (1212B)


      1 // |reftest| module
      2 // Copyright (C) 2016 the V8 project authors. All rights reserved.
      3 // This code is governed by the BSD license found in the LICENSE file.
      4 /*---
      5 description: >
      6    Module Environment Records provide a this binding, and the value is
      7    `undefined`.
      8 esid: sec-moduleevaluation
      9 info: |
     10    [...]
     11    16. Let result be the result of evaluating module.[[ECMAScriptCode]].
     12    [...]
     13 
     14    12.2.2 The this Keyword
     15    12.2.2.1 Runtime Semantics: Evaluation
     16 
     17    PrimaryExpression : this
     18 
     19    1. Return ? ResolveThisBinding( ).
     20 
     21    8.3.4 ResolveThisBinding ( )
     22 
     23    1. Let envRec be GetThisEnvironment( ).
     24    2. Return ? envRec.GetThisBinding().
     25 
     26    8.3.3 GetThisEnvironment ( )
     27 
     28    1. Let lex be the running execution context's LexicalEnvironment.
     29    2. Repeat
     30       a. Let envRec be lex's EnvironmentRecord.
     31       b. Let exists be envRec.HasThisBinding().
     32       c. If exists is true, return envRec.
     33       d. Let outer be the value of lex's outer environment reference.
     34       e. Let lex be outer.
     35 
     36    8.1.1.5.3 HasThisBinding ()
     37 
     38    1. Return true.
     39 
     40    8.1.1.5.4 GetThisBinding ()
     41 
     42    1. Return undefined.
     43 flags: [module]
     44 ---*/
     45 
     46 assert.sameValue(this, undefined);
     47 
     48 reportCompare(0, 0);