Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(295)

Side by Side Diff: src/unscopables.js

Issue 384963002: ES6 Unscopables (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/symbol.js ('k') | test/cctest/cctest.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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 ExtendSymbol() {
12 %CheckIsBootstrapping();
13 InstallConstants($Symbol, $Array(
14 "unscopables", symbolUnscopables
15 ));
16 }
17
18 ExtendSymbol();
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 ExtendArrayPrototype() {
34 %CheckIsBootstrapping();
35 %AddNamedProperty($Array.prototype, symbolUnscopables, arrayUnscopables,
36 DONT_ENUM | READ_ONLY);
37 }
38
39 ExtendArrayPrototype();
OLDNEW
« no previous file with comments | « src/symbol.js ('k') | test/cctest/cctest.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698