| // Copyright (c) 2012 Ecma International. All rights reserved. |
| // This code is governed by the BSD license found in the LICENSE file. |
| Object.create - ensure that if an exception is thrown it occurs in |
| the correct order relative to prior and subsequent side-effects |
| Object.defineProperty(props, "prop1", { |
| Object.defineProperty(props, "prop2", { |
| assert.throws(RangeError, function() { |
| newObj = Object.create({}, props); |
| assert.sameValue(newObj.hasOwnProperty("prop1"), false, 'newObj.hasOwnProperty("prop1")'); |
| assert.sameValue(i, 2, 'i'); |