tor-browser

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

trap-is-undefined.js (503B)


      1 // Copyright (C) 2015 the V8 project authors. All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 /*---
      4 es6id: 9.5.8
      5 description: >
      6    [[Get]] (P, Receiver)
      7 
      8    8. If trap is undefined, then return target.[[Get]](P, Receiver).
      9 
     10 features: [Proxy]
     11 ---*/
     12 
     13 var target = {
     14  attr: 1
     15 };
     16 var p = new Proxy(target, {
     17  get: undefined
     18 });
     19 
     20 assert.sameValue(p.attr, 1, 'return target.attr');
     21 assert.sameValue(p.foo, undefined, 'return target.foo');
     22 
     23 reportCompare(0, 0);