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

Side by Side Diff: src/js/array.js

Issue 2033263002: [es7] Array.prototype.includes should be unscopable (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « no previous file | test/mjsunit/es7/array-includes.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 (function(global, utils, extrasUtils) { 5 (function(global, utils, extrasUtils) {
6 6
7 "use strict"; 7 "use strict";
8 8
9 %CheckIsBootstrapping(); 9 %CheckIsBootstrapping();
10 10
(...skipping 1639 matching lines...) Expand 10 before | Expand all | Expand 10 after
1650 DONT_ENUM); 1650 DONT_ENUM);
1651 1651
1652 // Set up unscopable properties on the Array.prototype object. 1652 // Set up unscopable properties on the Array.prototype object.
1653 var unscopables = { 1653 var unscopables = {
1654 __proto__: null, 1654 __proto__: null,
1655 copyWithin: true, 1655 copyWithin: true,
1656 entries: true, 1656 entries: true,
1657 fill: true, 1657 fill: true,
1658 find: true, 1658 find: true,
1659 findIndex: true, 1659 findIndex: true,
1660 includes: true,
1660 keys: true, 1661 keys: true,
1661 }; 1662 };
1662 1663
1663 %AddNamedProperty(GlobalArray.prototype, unscopablesSymbol, unscopables, 1664 %AddNamedProperty(GlobalArray.prototype, unscopablesSymbol, unscopables,
1664 DONT_ENUM | READ_ONLY); 1665 DONT_ENUM | READ_ONLY);
1665 1666
1666 %FunctionSetLength(ArrayFrom, 1); 1667 %FunctionSetLength(ArrayFrom, 1);
1667 1668
1668 // Set up non-enumerable functions on the Array object. 1669 // Set up non-enumerable functions on the Array object.
1669 utils.InstallFunctions(GlobalArray, DONT_ENUM, [ 1670 utils.InstallFunctions(GlobalArray, DONT_ENUM, [
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
1780 %InstallToContext([ 1781 %InstallToContext([
1781 "array_pop", ArrayPop, 1782 "array_pop", ArrayPop,
1782 "array_push", ArrayPush, 1783 "array_push", ArrayPush,
1783 "array_shift", ArrayShift, 1784 "array_shift", ArrayShift,
1784 "array_splice", ArraySplice, 1785 "array_splice", ArraySplice,
1785 "array_slice", ArraySlice, 1786 "array_slice", ArraySlice,
1786 "array_unshift", ArrayUnshift, 1787 "array_unshift", ArrayUnshift,
1787 ]); 1788 ]);
1788 1789
1789 }); 1790 });
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/es7/array-includes.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698