| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Flags: --harmony-proxies | |
| 6 | |
| 7 var target = {}; | 5 var target = {}; |
| 8 var configurable_desc = { | 6 var configurable_desc = { |
| 9 value: 123, | 7 value: 123, |
| 10 configurable: true, | 8 configurable: true, |
| 11 writable: true, | 9 writable: true, |
| 12 enumerable: false, | 10 enumerable: false, |
| 13 }; | 11 }; |
| 14 Object.defineProperty(target, "configurable", configurable_desc); | 12 Object.defineProperty(target, "configurable", configurable_desc); |
| 15 var nonconfigurable_desc = { | 13 var nonconfigurable_desc = { |
| 16 value: 234, | 14 value: 234, |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 // Step 11e: See (Inv-3) above. | 118 // Step 11e: See (Inv-3) above. |
| 121 | 119 |
| 122 // Step 16: Incompatible PropertyDescriptor; a non-configurable property | 120 // Step 16: Incompatible PropertyDescriptor; a non-configurable property |
| 123 // cannot be reported as configurable. (Inv-4) above checks more cases. | 121 // cannot be reported as configurable. (Inv-4) above checks more cases. |
| 124 handler.getOwnPropertyDescriptor = function(target, name) { | 122 handler.getOwnPropertyDescriptor = function(target, name) { |
| 125 return {value: 456, configurable: true, writable: true} | 123 return {value: 456, configurable: true, writable: true} |
| 126 }; | 124 }; |
| 127 assertThrows('Object.getOwnPropertyDescriptor(proxy, "nonconfigurable")'); | 125 assertThrows('Object.getOwnPropertyDescriptor(proxy, "nonconfigurable")'); |
| 128 | 126 |
| 129 // Step 17: See (Inv-2) above. | 127 // Step 17: See (Inv-2) above. |
| OLD | NEW |