15.2.3.6-4-420.js (692B)
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-420 6 description: > 7 ES5 Attributes - Failed to add a property to an object when the 8 object's prototype has a property with the same name and 9 [[Writable]] set to false(Function.prototype.bind) 10 includes: [propertyHelper.js] 11 ---*/ 12 13 var foo = function() {}; 14 15 Object.defineProperty(Function.prototype, "prop", { 16 value: 1001, 17 writable: false, 18 enumerable: false, 19 configurable: true 20 }); 21 22 var obj = foo.bind({}); 23 assert(!obj.hasOwnProperty("prop")); 24 verifyNotWritable(foo, "prop", "noCheckOwnProp"); 25 26 reportCompare(0, 0);