| 1 |
// Copyright (C) 2015 the V8 project authors. All rights reserved. |
| 2 |
// This code is governed by the BSD license found in the LICENSE file. |
| 3 |
/*--- |
| 4 |
es6id: 9.5.10 |
| 5 |
description: > |
| 6 |
[[Delete]] (P) |
| 7 |
|
| 8 |
A property cannot be reported as deleted, if it exists as a non-configurable |
| 9 |
own property of the target object. |
| 10 |
info: | |
| 11 |
14. If targetDesc.[[Configurable]] is false, throw a TypeError exception. |
| 12 |
---*/ |
| 13 |
|
| 14 |
var target = {}; |
| 15 |
var p = new Proxy(target, { |
| 16 |
deleteProperty: function() { |
| 17 |
return true; |
| 18 |
} |
| 19 |
}); |
| 20 |
|
| 21 |
Object.defineProperty(target, "attr", { |
| 22 |
configurable: false, |
| 23 |
value: 1 |
| 24 |
}); |
| 25 |
|
| 26 |
assert.throws(TypeError, function() { |
| 27 |
delete p.attr; |
| 28 |
}); |