| // Copyright (c) 2012 Ecma International. All rights reserved. |
| // This code is governed by the BSD license found in the LICENSE file. |
| Object.getOwnPropertyDescriptor - TypeError exception was thrown |
| when 'P' is an object that both toString and valueOf wouldn't |
| var toStringAccessed = false; |
| var valueOfAccessed = false; |
| assert.throws(TypeError, function() { |
| Object.getOwnPropertyDescriptor(obj, ownProp); |
| assert(toStringAccessed, 'toStringAccessed !== true'); |
| assert(valueOfAccessed, 'valueOfAccessed !== true'); |