| // Copyright (C) 2016 the V8 project authors. All rights reserved. |
| // This code is governed by the BSD license found in the LICENSE file. |
| Module Environment Records provide a this binding, and the value is |
| esid: sec-moduleevaluation |
| 16. Let result be the result of evaluating module.[[ECMAScriptCode]]. |
| 12.2.2.1 Runtime Semantics: Evaluation |
| 1. Return ? ResolveThisBinding( ). |
| 8.3.4 ResolveThisBinding ( ) |
| 1. Let envRec be GetThisEnvironment( ). |
| 2. Return ? envRec.GetThisBinding(). |
| 8.3.3 GetThisEnvironment ( ) |
| 1. Let lex be the running execution context's LexicalEnvironment. |
| a. Let envRec be lex's EnvironmentRecord. |
| b. Let exists be envRec.HasThisBinding(). |
| c. If exists is true, return envRec. |
| d. Let outer be the value of lex's outer environment reference. |
| 8.1.1.5.3 HasThisBinding () |
| 8.1.1.5.4 GetThisBinding () |
| assert.sameValue(this, undefined); |