tor-browser

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

15.2.3.6-4-596.js (691B)


      1 // Copyright (c) 2012 Ecma International.  All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 
      4 /*---
      5 es5id: 15.2.3.6-4-596
      6 description: >
      7    ES5 Attributes - Fail to update value of property into of
      8    [[Proptotype]] internal property (Function.prototype.bind)
      9 includes: [propertyHelper.js]
     10 ---*/
     11 
     12 var foo = function() {};
     13 var data = "data";
     14 
     15 Object.defineProperty(Function.prototype, "prop", {
     16  get: function() {
     17    return data;
     18  },
     19  enumerable: false,
     20  configurable: true
     21 });
     22 
     23 var obj = foo.bind({});
     24 
     25 assert(!obj.hasOwnProperty("prop"));
     26 verifyNotWritable(obj, "prop", "nocheck");
     27 assert.sameValue(obj.prop, "data");;
     28 
     29 reportCompare(0, 0);