OLD | NEW |
| (Empty) |
1 // Copyright 2014 the V8 project authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 'use strict'; | |
6 | |
7 // This file relies on the fact that the following declaration has been made. | |
8 // var $Array = global.Array; | |
9 // var $Symbol = global.Symbol; | |
10 | |
11 function UnscopablesExtendSymbol() { | |
12 %CheckIsBootstrapping(); | |
13 InstallConstants($Symbol, $Array( | |
14 "unscopables", symbolUnscopables | |
15 )); | |
16 } | |
17 | |
18 UnscopablesExtendSymbol(); | |
19 | |
20 | |
21 var arrayUnscopables = { | |
22 __proto__: null, | |
23 copyWithin: true, | |
24 entries: true, | |
25 fill: true, | |
26 find: true, | |
27 findIndex: true, | |
28 keys: true, | |
29 values: true, | |
30 }; | |
31 | |
32 | |
33 function UnscopablesExtendArrayPrototype() { | |
34 %CheckIsBootstrapping(); | |
35 %AddNamedProperty($Array.prototype, symbolUnscopables, arrayUnscopables, | |
36 DONT_ENUM | READ_ONLY); | |
37 } | |
38 | |
39 UnscopablesExtendArrayPrototype(); | |
OLD | NEW |