tor-browser

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

has-property-err.js (872B)


      1 // Copyright (c) 2016 the V8 project authors. All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 
      4 /*---
      5 esid: sec-getidentifierreference
      6 es6id: 8.1.2.1
      7 description: >
      8  Behavior when binding query produces an abrupt completion
      9 info: |
     10  [...]
     11  2. Let envRec be lex's EnvironmentRecord.
     12  3. Let exists be ? envRec.HasBinding(name).
     13 
     14  8.1.1.2.1 HasBinding
     15 
     16  1. Let envRec be the object Environment Record for which the method was
     17     invoked.
     18  2. Let bindings be the binding object for envRec.
     19  3. Let foundBinding be ? HasProperty(bindings, N).
     20 flags: [noStrict]
     21 features: [Proxy]
     22 ---*/
     23 
     24 var thrower = new Proxy({}, {
     25  has: function(_, name) {
     26    if (name === 'test262') {
     27      throw new Test262Error();
     28    }
     29  }
     30 });
     31 
     32 with (thrower) {
     33  assert.throws(Test262Error, function() {
     34    test262;
     35  });
     36 }
     37 
     38 reportCompare(0, 0);