tor-browser

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

eval-gtbndng-indirect-update.js (1184B)


      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    Modifications to named bindings that occur after dependency has been
      7    evaluated are reflected in local binding
      8 esid: sec-moduleevaluation
      9 info: |
     10    8.1.1.5.1 GetBindingValue (N, S)
     11 
     12    [...]
     13    3. If the binding for N is an indirect binding, then
     14       a. Let M and N2 be the indirection values provided when this binding for
     15          N was created.
     16       b. Let targetEnv be M.[[Environment]].
     17       c. If targetEnv is undefined, throw a ReferenceError exception.
     18       d. Let targetER be targetEnv's EnvironmentRecord.
     19       e. Return ? targetER.GetBindingValue(N2, S).
     20 includes: [fnGlobalObject.js]
     21 flags: [module]
     22 ---*/
     23 
     24 import { x } from './eval-gtbndng-indirect-update_FIXTURE.js';
     25 
     26 assert.sameValue(x, 1);
     27 
     28 // This function is exposed on the global scope (instead of as an exported
     29 // binding) in order to avoid possible false positives from assuming correct
     30 // behavior of the semantics under test.
     31 fnGlobalObject().test262update();
     32 
     33 assert.sameValue(x, 2);
     34 
     35 reportCompare(0, 0);