Debian Codegraph @

js/src/tests/test262/language/arguments-object/mapped/nonconfigurable-descriptors-set-value-with-define-property.js

raw
1 // Copyright (C) 2017 Caio Lima. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3
4 /*---
5 description: Mapped arguments property descriptor change with non-configurable property
6 info: |
7 Mapping keep working when property is set to non-configurable and its
8 value is changed using [[DefineOwnProperty]].
9 flags: [noStrict]
10 esid: sec-arguments-exotic-objects-defineownproperty-p-desc
11 includes: [propertyHelper.js]
12 ---*/
13
14 function setArgumentValueWithDefineOwnProperty(a) {
15 Object.defineProperty(arguments, "0", {configurable: false});
16
17 Object.defineProperty(arguments, "0", {value: 2});
18
19 assert.sameValue(a, 2);
20
21 verifyProperty(arguments, "0", {
22 value: 2,
23 writable: true,
24 enumerable: true,
25 configurable: false,
26 });
27 }
28 setArgumentValueWithDefineOwnProperty(1);
29
30
31 reportCompare(0, 0);