tor-browser

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

proxy.js (635B)


      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: 26.2.2.1
      5 description: >
      6    The returned object has a proxy property which is the created Proxy object
      7    built with the given target and handler given parameters.
      8 info: |
      9    Proxy.revocable ( target, handler )
     10 
     11    6. Perform CreateDataProperty(result, "proxy", p).
     12 features: [Proxy]
     13 ---*/
     14 
     15 var target = {
     16  attr: "foo"
     17 };
     18 var r = Proxy.revocable(target, {
     19  get: function(t, prop) {
     20    return t[prop] + "!";
     21  }
     22 });
     23 
     24 assert.sameValue(r.proxy.attr, "foo!");
     25 
     26 reportCompare(0, 0);