tor-browser

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

eval-gtbndng-indirect-update-dflt.js (908B)


      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 default binding that occur after dependency has been
      7    evaluated are reflected in local binding
      8 info: |
      9    8.1.1.5.1 GetBindingValue (N, S)
     10 
     11    [...]
     12    3. If the binding for N is an indirect binding, then
     13       a. Let M and N2 be the indirection values provided when this binding for
     14          N was created.
     15       b. Let targetEnv be M.[[Environment]].
     16       c. If targetEnv is undefined, throw a ReferenceError exception.
     17       d. Let targetER be targetEnv's EnvironmentRecord.
     18       e. Return ? targetER.GetBindingValue(N2, S).
     19 flags: [module]
     20 ---*/
     21 
     22 import val from './eval-gtbndng-indirect-update-dflt_FIXTURE.js';
     23 
     24 assert.sameValue(val(), 1);
     25 assert.sameValue(val, 2);
     26 
     27 reportCompare(0, 0);