tor-browser

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

trap-is-undefined.js (522B)


      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 esid: sec-proxy-object-internal-methods-and-internal-slots-set-p-v-receiver
      5 description: >
      6    [[Set]] ( P, V, Receiver)
      7 
      8    7. If trap is undefined, then
      9      a. Return ? target.[[Set]](P, V, Receiver)
     10 
     11 features: [Proxy]
     12 ---*/
     13 
     14 var target = {
     15  attr: 1
     16 };
     17 var p = new Proxy(target, {
     18  set: undefined
     19 });
     20 
     21 p.attr = 2;
     22 
     23 assert.sameValue(target.attr, 2);
     24 
     25 reportCompare(0, 0);