tor-browser

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

result-is-undefined.js (685B)


      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.5
      5 description: >
      6    Return undefined if trap result is undefined and target is extensible and
      7    the target property descriptor is configurable.
      8 info: |
      9    [[GetOwnProperty]] (P)
     10 
     11    ...
     12    14. If trapResultObj is undefined, then
     13        ...
     14        f. Return undefined.
     15    ...
     16 features: [Proxy]
     17 ---*/
     18 
     19 var target = {
     20  attr: 1
     21 };
     22 
     23 var p = new Proxy(target, {
     24  getOwnPropertyDescriptor: function(t, prop) {
     25    return;
     26  }
     27 });
     28 
     29 assert.sameValue(Object.getOwnPropertyDescriptor(p, "attr"), undefined);
     30 
     31 reportCompare(0, 0);