You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

22 lines
559 B

/*===
[object Object]
true
===*/
/* Object.getOwnPropertyDescriptor() should return an object, whose prototype
* is Object.prototype. Object.prototype is non-configurable and non-writable,
* so there is no distinction between current and initial value.
*
* Once getOwnPropertyDescriptor() returned an object with null prototype.
*/
try {
var obj = { foo: 1 };
var pd = Object.getOwnPropertyDescriptor(obj, 'foo');
print(Object.getPrototypeOf(pd));
print(Object.getPrototypeOf(pd) === Object.prototype);
} catch (e) {
print(e);
}